title: How to properly include library path and other flags in extconf.rb for SWIG?
body: <p>Suppose I were to compile a C file with command    </p>
  
  <pre><code>g++ a.cpp  -I/usr/local/gr/include -L/usr/local/gr/lib -lGR -lm -Wl,-rpath,/usr/local/gr/lib
  </code></pre>
  
  <p>How would I define the extconf.rb file in SWIG so that it doesn't ignore the linker paths?<br>
  This is my current extconf.rb file.    </p>
  
  <pre><code>require 'mkmf'
  system('swig -c++ -ruby example.i') or abort
  $CXXFLAGS += " -I/usr/local/gr/include -L/usr/local/gr/lib -lGR -lm -Wl,-rpath,/usr/local/gr/lib "
  create_makefile('example')
  </code></pre>
  
  <p>It ignores the linker flags with the error </p>
  
  <pre><code>clang: warning: -lGR: 'linker' input unused [-Wunused-command-line-argument]
  clang: warning: -lm: 'linker' input unused [-Wunused-command-line-argument]
  clang: warning: -Wl,-rpath,/usr/local/gr/lib: 'linker' input unused [-Wunused-command-line-argument]
  clang: warning: argument unused during compilation: '-L/usr/local/gr/lib' [-Wunused-command-line-argument]
  </code></pre>