--- nmap-4.68-orig/configure 2008-06-15 16:05:12 +0900 +++ nmap-4.68/configure 2008-07-02 19:45:41 +0900 @@ -7347,7 +7347,7 @@ # They don't want lua if test "$no_lua" = "yes"; then - CXXFLAGS="-DNOLUA $CXXFLAGS" + CPPFLAGS="-DNOLUA $CPPFLAGS" LIBLUA_LIBS="" LUA_DEPENDS="" LUA_BUILD="" --- nmap-4.68-orig/configure.ac 2008-06-15 16:05:12 +0900 +++ nmap-4.68/configure.ac 2008-07-02 19:45:48 +0900 @@ -524,7 +524,7 @@ # They don't want lua if test "$no_lua" = "yes"; then - CXXFLAGS="-DNOLUA $CXXFLAGS" + CPPFLAGS="-DNOLUA $CPPFLAGS" LIBLUA_LIBS="" LUA_DEPENDS="" LUA_BUILD="" --- nmap-4.68-orig/NmapOps.cc 2008-06-08 14:29:00 +0900 +++ nmap-4.68/NmapOps.cc 2008-07-02 19:35:52 +0900 @@ -457,9 +457,11 @@ if(ipoptions && osscan) error("WARNING: Ip options are NOT used while OS scanning!"); +#ifndef NOLUA /* Make sure nmap.registry.args is available (even if it's empty) */ if (!scriptargs) scriptargs = strdup(""); +#endif } void NmapOps::setMaxOSTries(int mot) { --- nmap-4.68-orig/Target.cc 2008-06-10 01:54:08 +0900 +++ nmap-4.68/Target.cc 2008-07-02 19:36:15 +0900 @@ -179,11 +179,13 @@ if (FPR) delete FPR; +#ifndef NOLUA if (o.script) { ScriptResults::iterator sriter; for (sriter = scriptResults.begin(); sriter != scriptResults.end(); sriter++) free((*sriter).id); } +#endif } /* Creates a "presentation" formatted string out of the IPv4/IPv6 address. --- nmap-4.68-orig/nmap.cc 2008-06-24 23:35:48 +0900 +++ nmap-4.68/nmap.cc 2008-07-02 19:34:55 +0900 @@ -1899,7 +1899,9 @@ if (o.dns_servers) free(o.dns_servers); if (o.extra_payload) free(o.extra_payload); if (o.ipoptions) free(o.ipoptions); +#ifndef NOLUA free(o.scriptargs); +#endif } /* Reads in a (normal or machine format) Nmap log file and gathers enough --- nmap-4.68-orig/nse_main.h 2008-06-20 16:19:37 +0900 +++ nmap-4.68/nse_main.h 2008-07-02 19:34:12 +0900 @@ -1,11 +1,13 @@ #ifndef NMAP_LUA_H #define NMAP_LUA_H +#ifndef NOLUA extern "C" { #include "lua.h" #include "lualib.h" #include "lauxlib.h" } +#endif #include #include --- nmap-4.68-orig/portlist.cc 2008-06-10 01:54:08 +0900 +++ nmap-4.68/portlist.cc 2008-07-02 19:35:29 +0900 @@ -150,11 +150,13 @@ free(serviceprobe_service); if (serviceprobe_fp) free(serviceprobe_fp); +#ifndef NOLUA if (o.script) { ScriptResults::iterator sriter; for (sriter = scriptResults.begin(); sriter != scriptResults.end(); sriter++) free((*sriter).id); } +#endif } // Uses the sd->{product,version,extrainfo} if available to fill