title: math.h not found when using openmp (llvm) with sourceCpp
body: <p>I am trying to use openmp in my Rcpp code and encounter some issues (Mac OS). 
  Have tried googling a lot but not able to find a solution that works for me. Would appreciate if you can provide some thoughts.</p>
  
  <p>Some of my setups:
  1) installed llvm from home-brew
  2) Makevars in ~/.R</p>
  
  <p>CXX= /usr/local/opt/llvm/bin/clang-cpp</p>
  
  <p>CXXFLAGS =-I/usr/local/lib -I/usr/local/opt/llvm/include</p>
  
  <p>LDFLAGS=“-L/usr/local/opt/llvm/lib  -Wl,-rpath,/usr/local/opt/llvm/lib”</p>
  
  <p>It looks like the LDFLAGS specified in the Makevars was ignored.
  Also, when I use sourceCpp(temp.cpp), I get this error</p>
  
  <blockquote>
    <p>usr/local/opt/llvm/bin/clang-cpp 
    -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include  -I"/Users/myname/Library/R/3.2/library/Rcpp/include" -I"/Users/myname/Library/R/3.2/library/RcppArmadillo/include"  -fopenmp -fPIC  -I/usr/local/lib -I/usr/local/opt/llvm/include -c temp.cpp -o temp.o</p>
    
    <p>In file included from temp.cpp:2:
    /usr/local/Cellar/llvm/4.0.0_1/bin/../include/c++/v1/math.h:301:15:
    fatal error: 'math.h' file not found</p>
    
    <h1>include_next </h1>
    
    <p>^~~~~~~~ 1 error generated. Error in sourceCpp(paste(path2, "temp.cpp", sep = ""), verbose = TRUE,  :<br>
    Error 1 occurred building shared library. make: *** [temp.o] Error 1</p>
  </blockquote>
  
  <p>In the temp.cpp, I have put</p>
  
  <pre><code>#include &lt;math.h&gt;
  #include &lt;RcppArmadillo.h&gt;
  #include &lt;omp.h&gt;
  
  // [[Rcpp::depends(RcppArmadillo)]]
  
  // [[Rcpp::plugins(openmp)]]
  
  
  
  using namespace Rcpp;
  </code></pre>