hey folks-<div><br></div><div>i just wanted to drop a note that i was able to successfully compile the powerdns recursor on Mac OS X 10.6.2 (Snow Leopard), lua scripting enabled, with relative ease. i didnt see anything in my mail archives about this, so im not sure if anyone has done it yet. so, for the curious, my steps were (this all assumes you have the OS X Developer Tools installed):</div>

<div><br></div><div>1) get boost:</div><div>--------------</div><div>downloaded the boost_1_41_0.tar.gz source from <a href="http://sourceforge.net/projects/boost/files/boost/1.41.0/">http://sourceforge.net/projects/boost/files/boost/1.41.0/</a> and uncompressed to /Users/chet/boost_1_41_0</div>

<div><br></div><div>2) get lua:</div><div>-----------</div><div>downloaded the latest lua (5.1.4 as of today) from <a href="http://www.lua.org/ftp/lua-5.1.4.tar.gz">http://www.lua.org/ftp/lua-5.1.4.tar.gz</a> and uncompressed to /Users/chet/lua-5.1.4</div>

<div><br></div><div>3) compile lua:</div><div>-----------------</div><div>jumped into my uncompressed lua-5.1.4 directory, then ran:</div><div>$ sudo make macosx install</div><div><br></div><div>(that was easy)</div><div>

<br></div><div>so, now that are prereqs are satisfied, lets compile the pdns-recursor:</div><div><br></div><div>4) download the latest (as of today) from <a href="http://downloads.powerdns.com/releases/pdns-recursor-3.1.7.1.tar.bz2">http://downloads.powerdns.com/releases/pdns-recursor-3.1.7.1.tar.bz2</a> and uncompress it.</div>

<div><br></div><div>5) now, from within our uncompressed pdns-recursor-3.1.7.1 directory, run configure:</div><div><br></div><div>$ CXXFLAGS=-I/Users/chet/boost_1_41_0/ LUA=1 ./configure</div><div><br></div><div>6) now, modify the pdns-recursor Makefile to set the LUA include/lib flags:</div>

<div><br></div><div><div>LUA_CPPFLAGS_CONFIG ?= -I/usr/local/include</div><div>LUA_LIBS_CONFIG ?= -L/usr/local/lib -llua</div></div><div><br></div><div>(note: depending on if you did any custom modifications to the lua Makefile itself, you may have different include and lib directories)</div>

<div><br></div><div>6a) additionally, you can change the pdns-recursor Makefile to specify different bin/sbin/config install paths. i did this:</div><div><br></div><div><div>SBINDIR=/usr/local/pdns/sbin/</div><div>BINDIR=/usr/local/pdns/bin/</div>

<div>CONFIGDIR=/usr/local/pdns/etc/</div><div><br></div></div><div>7) now, lets make!</div><div><br></div><div>$ CXXFLAGS=-I/Users/chet/boost_1_41_0/ LUA=1 make</div><div><br></div><div>8) assuming all goes well, you should see a bunch of compile lines, and it should complete without any errors. at this point, install!</div>

<div><br></div><div>$ sudo make install</div><div><br></div><div>ta da! and now if you go into /usr/local/pdns, you'll see your bin, sbin, and etc dirs. etc/recursor.conf-dist will probably end up being renamed to recursor.conf, but thats up to you, of course.</div>

<div><br></div><div>as for lua, just set a lua script path with in your recursor.conf and have fun!</div><div><br></div><div>if anyone has any issues or comments, let me know. most of it is pretty self-explanatory and already documented, but it took some twiddling with the LUA flags in the pdns-recursor Makefile to get it to compile.</div>

<div><br></div><div>enjoy! </div><div><br></div><div>chet</div><div><br></div><div>-- <br>----------------------------------------<br>chet nichols III<br><a href="mailto:chet.nichols@gmail.com">chet.nichols@gmail.com</a><br>

aim: chet / twitter: chet<br><a href="http://chetnichols.org">http://chetnichols.org</a><br>----------------------------------------<br>
</div>