title: automake: the ordering of compiler options hinders make
body: <p>I am new to automake tools. In "src/Makefile.am", I use "AM_LDFLAGS = -L... -l...".</p>
  
  <p>Then, I run "autoreconf --force --install ; ./configure ; make"</p>
  
  <p>In the last command, </p>
  
  <pre><code>$ g++ -O2 -L... -l... -o target_name [some *.o files]
  </code></pre>
  
  <p>the compiler complains "undefined reference to ...".</p>
  
  <p>But if I copy it and move "-L... -l..." to the end, and run it independently it is fine (below).</p>
  
  <pre><code>$ g++ -O2 -o target_name [some *.o files] -L... -l...
  </code></pre>
  
  <p>So the order of options does matter? Anyway, how to smooth it?</p>
  
  <p>Thanks a lot.</p>