<div dir="ltr"><br><br><div class="gmail_quote">On Sat, Sep 17, 2011 at 6:42 PM, Nginx User <span dir="ltr"><<a href="mailto:nginx@nginxuser.net">nginx@nginxuser.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr"><br><br><div class="gmail_quote"><div><div></div><div class="h5">On Sat, Sep 17, 2011 at 6:22 PM, agentzh <span dir="ltr"><<a href="mailto:agentzh@gmail.com" target="_blank">agentzh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Sat, Sep 17, 2011 at 10:43 PM, Nginx User <<a href="mailto:nginx@nginxuser.net" target="_blank">nginx@nginxuser.net</a>> wrote:<br>
>><br>
>> These options should be happily accepted by the last 2nd option. If<br>
>> not, please let me know :)<br>
><br>
><br>
> They are matched by the last option of 'die "Invalid option $opt\n";' .<br>
><br>
<br>
</div>I've just confirmed that at least "--includedir=PATH" and<br>
"--datadir=PATH" are accepted by ngx_openresty's configure script but<br>
rejected by nginx's configure script:<br>
<br>
    ~/work/nginx-1.0.6 $ ./configure --includedir=/tmp/blah<br>
    ./configure: error: invalid option "--includedir=/tmp/blah"<br>
<br>
    ~/work/nginx-1.0.6 $ ./configure --datadir=/tmp/blah<br>
    ./configure: error: invalid option "--datadir=/tmp/blah"<br>
<br>
Please note that the 'error: invalid option ".*"' messages<br>
*different* from the one output by 'die "Invalid option $opt\n";'.<br>
<br>
Regards,<br>
<font color="#888888">-agentzh<br></font></blockquote><div><br></div></div></div><div>Nginx configure script has to be patched for rpm build environment.</div><div>Below is the standard patch used.</div><div><br></div></div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div class="gmail_quote"><div>--- auto/cc/gcc.orig<span style="white-space:pre-wrap">     </span>2007-03-22 08:34:53.000000000 -0600</div></div><div class="gmail_quote"><div>+++ auto/cc/gcc<span style="white-space:pre-wrap">  </span>2007-03-22 08:58:47.000000000 -0600</div>

</div><div class="gmail_quote"><div>@@ -172,7 +172,9 @@</div></div><div class="gmail_quote"><div> </div></div><div class="gmail_quote"><div> </div></div><div class="gmail_quote"><div> # stop on warning</div></div><div class="gmail_quote">

<div>-CFLAGS="$CFLAGS -Werror"</div></div><div class="gmail_quote"><div>+# This combined with Fedora's FORTIFY_SOURCE=2 option causes it nginx</div></div><div class="gmail_quote"><div>+# to not compile.</div>

</div><div class="gmail_quote"><div>+#CFLAGS="$CFLAGS -Werror"</div></div><div class="gmail_quote"><div> </div></div><div class="gmail_quote"><div> # debug</div></div><div class="gmail_quote"><div> CFLAGS="$CFLAGS -g"</div>

</div></blockquote><div class="gmail_quote"><div><br></div><div>The standard outputs from the rpm %configure macro including all those elements build fine after this when building nginx by itself. An example of the typical spec file with this patch is <a href="http://www4.atomicorp.com/channels/source/nginx/nginx.spec" target="_blank">http://www4.atomicorp.com/channels/source/nginx/nginx.spec</a> (they are not up to date but it does work as is for 1.0.6 and should for the 1.1.x branch as well.</div>

<div><br></div><div>However things crash with the openresty configure as said. Specifically, the message returned is for on "--build" which is the first one encountered. Recreating the build machine at the moment so can't give specifics right now. I'll try changing the text in <span style="font-family:arial, sans-serif;font-size:13px;background-color:rgb(255, 255, 255)">'die "Invalid option $opt\n";' when having another go to verify whether it is actually this or not. Looking at the code though, it seems clear that these extra options will fail at the specified point.</span></div>

<div> </div></div><div>Thanks.</div></div>
</blockquote></div><br><div><br></div><div>Hi.</div><div><br></div><div>Just looking at the spec file example I linked to, I can see it is not using the rpm %configure macro.  So you were on to something there. </div><div>
<br></div><div>I suppose the only remaining valid request from my original post is the lua one.</div><div><br></div><div>Thanks </div></div>