-#
-#
-# This file converts cmake cache variables and command line options
-# into compiler flags
-#
+# map cmake options to compiler defines and do miscellaneous further configuration work
+# cmake options are defined in cmake/create_options.cmake
+# features
-# convert cmake options into compiler defines
+set ( SHELL ${ENABLE_SHELL} )
+set ( SIDE_CHANNEL ${BUILD_SIDE_CHANNEL} )
+set ( UNIT_TEST ${BUILD_UNIT_TESTS} )
+set ( PIGLET ${ENABLE_PIGLET} )
-set_project_compiler_defines_if_true (ENABLE_DEBUG_MSGS "DEBUG_MSGS")
-set_project_compiler_defines_if_true (ENABLE_DEBUG "DEBUG")
-set_project_compiler_defines_if_true (BUILD_HA "ENABLE_HA")
-set_project_compiler_defines_if_true (ENABLE_LARGE_PCAP "_LARGEFILE_SOURCE")
-set_project_compiler_defines_if_true (ENABLE_LARGE_PCAP "_FILE_OFFSET_BITS=64")
+if ( NOT ENABLE_COREFILES )
+ set ( NOCOREFILE ON )
+endif ( NOT ENABLE_COREFILES )
+set ( _LARGEFILE_SOURCE ${ENABLE_LARGE_PCAP} )
+if ( ENABLE_LARGE_PCAP )
+ set ( _FILE_OFFSET_BITS 64 )
+endif ( ENABLE_LARGE_PCAP )
-# convert cmake options into config.h defines
+# documentation
-
-set_if_true (STATIC_INSPECTORS STATIC_INSPECTORS)
-set_if_true (STATIC_SEARCH_ENGINES STATIC_SEARCH_ENGINES)
-set_if_true (STATIC_LOGGERS STATIC_LOGGERS)
-set_if_true (STATIC_IPS_ACTIONS STATIC_IPS_ACTIONS)
-set_if_true (STATIC_IPS_OPTIONS STATIC_IPS_OPTIONS)
-set_if_true (STATIC_CODECS STATIC_CODECS)
-set_if_true (BUILD_HA ENABLE_HA )
-set_if_true (ENABLE_DEBUG DEBUG)
-set_if_false (ENABLE_DEBUG NDEBUG)
-set_if_false (ENABLE_COREFILES NOCOREFILE)
-set_if_true (BUILD_SHELL BUILD_SHELL)
-set_if_true (BUILD_SIDE_CHANNEL SIDE_CHANNEL)
-set_if_true (BUILD_UNIT_TESTS UNIT_TEST)
-set_if_true (BUILD_PIGLET PIGLET)
-set_if_true (ENABLE_PROFILE PROFILE)
-set_if_true (ENABLE_SHELL BUILD_SHELL)
-set_if_true (BUILD_PIGLET PIGLET)
-set_if_true (STATIC_PIGLETS STATIC_PIGLETS)
-
-
-# convert cmake options into CXX flags
-if(ENABLE_DEBUG)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
-endif(ENABLE_DEBUG)
-
-if (ENABLE_GDB)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ggdb")
-endif ()
-
-if(ENABLE_PROFILE AND CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
+if ( NOT ASCIIDOC_FOUND )
+ get_property ( MAKE_HTML_DOC_HELP_STRING CACHE "MAKE_HTML_DOC" PROPERTY HELPSTRING )
+ set ( MAKE_HTML_DOC OFF CACHE BOOL ${MAKE_HTML_DOC_HELP_STRING} FORCE )
endif()
-if (ENABLE_ADDRESS_SANITIZER)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
+if ( NOT (DBLATEX_FOUND AND ASCIIDOC_FOUND) )
+ get_property ( MAKE_PDF_DOC_HELP_STRING CACHE "MAKE_PDF_DOC" PROPERTY HELPSTRING )
+ set ( MAKE_PDF_DOC OFF CACHE BOOL ${MAKE_PDF_DOC_HELP_STRING} FORCE )
endif()
-if (ENABLE_CODE_COVERAGE)
- set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -DNDEBUG")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fprofile-arcs -ftest-coverage")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fprofile-arcs -ftest-coverage")
-
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov")
- endif ()
+if ( NOT (W3M_FOUND AND ASCIIDOC_FOUND) )
+ get_property ( MAKE_TEXT_DOC_HELP_STRING CACHE "MAKE_TEXT_DOC" PROPERTY HELPSTRING )
+ set ( MAKE_TEXT_DOC OFF CACHE BOOL ${MAKE_TEXT_DOC_HELP_STRING} FORCE )
endif()
-if (BUILD_UNIT_TESTS)
- enable_testing()
-endif()
+# debugging
-# If not found, automatically set the cache to false
-if (NOT ASCIIDOC_FOUND)
- get_property(MAKE_HTML_DOC_HELP_STRING CACHE "MAKE_HTML_DOC" PROPERTY HELPSTRING)
- set(MAKE_HTML_DOC "OFF" CACHE BOOL ${MAKE_HTML_DOC_HELP_STRING} FORCE)
-endif()
+set ( DEBUG_MSGS ${ENABLE_DEBUG_MSGS} )
-if (NOT (DBLATEX_FOUND AND ASCIIDOC_FOUND))
- get_property(MAKE_PDF_DOC_HELP_STRING CACHE "MAKE_PDF_DOC" PROPERTY HELPSTRING)
- set(MAKE_PDF_DOC "OFF" CACHE BOOL ${MAKE_PDF_DOC_HELP_STRING} FORCE)
-endif()
+set ( DEBUG ${ENABLE_DEBUG} )
+if ( ENABLE_DEBUG )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g" )
+endif ( ENABLE_DEBUG )
-if (NOT (W3M_FOUND AND ASCIIDOC_FOUND))
- get_property(MAKE_TEXT_DOC_HELP_STRING CACHE "MAKE_TEXT_DOC" PROPERTY HELPSTRING)
- set(MAKE_TEXT_DOC "OFF" CACHE BOOL ${MAKE_TEXT_DOC_HELP_STRING} FORCE)
-endif()
+if ( ENABLE_GDB )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -ggdb" )
+endif ( ENABLE_GDB )
+if ( ENABLE_PROFILE AND CMAKE_COMPILER_IS_GNUCXX )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg" )
+endif ( ENABLE_PROFILE AND CMAKE_COMPILER_IS_GNUCXX )
+if ( ENABLE_ADDRESS_SANITIZER )
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer" )
+endif ( ENABLE_ADDRESS_SANITIZER )
-# If the user switches DAQS, search for the new, correct version
-if(DEFINED STATIC_DAQ_PRREVIOUSLY_ENABLED)
- if(NOT (ENABLE_STATIC_DAQ STREQUAL STATIC_DAQ_PRREVIOUSLY_ENABLED))
- unset(DAQ_FOUND CACHE)
- unset(DAQ_INCLUDE_DIR)
- unset(DAQ_LIBRARY CACHE)
- unset(DAQ_LIBRARIES CACHE)
- set(STATIC_DAQ_PRREVIOUSLY_ENABLED "${ENABLE_STATIC_DAQ}" CACHE INTERNAL "save daq link type" FORCE)
- find_package(DAQ REQUIRED)
- endif()
-else()
- set(STATIC_DAQ_PRREVIOUSLY_ENABLED "${ENABLE_STATIC_DAQ}" CACHE INTERNAL "save daq link type" FORCE)
-endif()
+if ( ENABLE_CODE_COVERAGE )
+ set ( CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -DNDEBUG" )
+ set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g -fprofile-arcs -ftest-coverage" )
+ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g -fprofile-arcs -ftest-coverage" )
+
+ if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
+ set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov" )
+ endif ()
+endif ( ENABLE_CODE_COVERAGE )
+# All of the possible user options. All of these options will show up
+# in the CACHE. If you'd like to change one of these values,
+# use `ccmake ${PATH_TO_SOURCE}`.
+# Alternatively, you can pass them to cmake on the command line using
+# the '-D' flag:
+# cmake -DENABLE_FOO=ON -DCMAKE_INSTALL_PREFIX=/my/install/path $cmake_src_path
+# static/dynamic switches
+option ( STATIC_CODECS "include codecs in binary" ON )
+option ( STATIC_INSPECTORS "include inspectors in binary" ON )
+option ( STATIC_LOGGERS "include loggers in binary" ON )
+option ( STATIC_IPS_ACTIONS "include ips actions in binary" ON )
+option ( STATIC_IPS_OPTIONS "include ips options in binary" ON )
+option ( STATIC_SEARCH_ENGINES "include search engines in binary" ON )
+option ( ENABLE_STATIC_DAQ "link static DAQ modules" ON )
-# All of the possible user options. All of these optinos will show up
-# in the CACHE. If you'd like to change one of these values,
-# use `ccmamke ${PATH_TO_SOURCE}`.
-
-
-option (STATIC_CODECS "include decoders in binary?" ON)
-option (STATIC_INSPECTORS "include inspectors in binary" ON)
-option (STATIC_LOGGERS "include loggers in binary" ON)
-option (STATIC_IPS_ACTIONS "include internal ips actions in binary" ON)
-option (STATIC_IPS_OPTIONS "include ips options in binary" ON)
-option (STATIC_SEARCH_ENGINES "include search engines in binary" ON)
-option (ENABLE_STATIC_DAQ "Link static DAQ modules" ON)
-option (ENABLE_PTHREAD "Disable pthread support" ON)
-option (ENABLE_DEBUG_MSGS "Enable debug printing options (bugreports and developers only)" OFF)
-option (ENABLE_DEBUG "Enable debugging options (bugreports and developers only)" OFF)
-option (ENABLE_GDB "Enable gdb debugging information" OFF)
-option (ENABLE_PROFILE "Enable profiling options (developers only)" OFF)
-option (ENABLE_SHELL "enable shell support" OFF)
-option (ENABLE_COREFILES "Prevent Snort from generating core files" ON)
-option (ENABLE_INTEL_SOFT_CPM "Enable Intel Soft CPM support" OFF)
-option (ENABLE_LARGE_PCAP "Enable support for pcaps larger than 2 GB" OFF)
-option (ENABLE_ADDRESS_SANITIZER "enable address sanitizer support" OFF)
-option (ENABLE_CODE_COVERAGE "Whether to enable code coverage support" OFF)
-option (BUILD_SHELL "Build the command line shell" OFF)
-option (BUILD_SIDE_CHANNEL "Build the side channel library" OFF)
-option (BUILD_UNIT_TESTS "Build Snort++ unit tests" OFF)
-option (BUILD_PIGLET "Build Piglet test harness" OFF)
-option (BUILD_EXTRA_PLUGINS "Build and test the plugins in the extra directory" OFF)
-option (MAKE_HTML_DOC "Create the HTML documentation" ON)
-option (MAKE_PDF_DOC "Create the PDF documentation" ON)
-option (MAKE_TEXT_DOC "Create the text documentation" ON)
-
-option (STATIC_PIGLETS "include piglet plugins in binary" ON)
-option (BUILD_PIGLET "Build Piglet test harness" OFF)
-
-set (SIGNAL_SNORT_RELOAD "" CACHE STRING "set the SIGNAL_SNORT_RELOAD value. THIS NUMBER MUST BE AN INTEGER!!")
-set (SIGNAL_SNORT_DUMP_STATS "" CACHE STRING "set the SIGNAL_SNORT_DUMP_STATS value. THIS NUMBER MUST BE AN INTEGER!!")
-set (SIGNAL_SNORT_ROTATE_STATS "" CACHE STRING "set the SIGNAL_SNORT_ROTATE_STATS value. THIS NUMBER MUST BE AN INTEGER!!")
-set (SIGNAL_SNORT_READ_ATTR_TBL "" CACHE STRING "set the SIGNAL_SNORT_READ_ATTR_TBL value. THIS NUMBER MUST BE AN INTEGER!!")
+# features
+option ( ENABLE_SHELL "enable shell support" OFF )
+option ( BUILD_SIDE_CHANNEL "Build the side channel library" OFF )
+option ( BUILD_UNIT_TESTS "Build Snort++ unit tests" OFF )
+option ( ENABLE_PIGLET "enable piglet test harness" OFF )
+
+option ( ENABLE_PTHREAD "enable pthread support" ON )
+option ( ENABLE_COREFILES "Prevent Snort from generating core files" ON )
+option ( ENABLE_INTEL_SOFT_CPM "Enable Intel Soft CPM support" OFF )
+option ( ENABLE_LARGE_PCAP "Enable support for pcaps larger than 2 GB" OFF )
+
+# documentation
+option ( MAKE_HTML_DOC "Create the HTML documentation" ON )
+option ( MAKE_PDF_DOC "Create the PDF documentation" ON )
+option ( MAKE_TEXT_DOC "Create the text documentation" ON )
+
+# debugging
+option ( ENABLE_DEBUG_MSGS "Enable debug printing options (bugreports and developers only)" OFF )
+option ( ENABLE_DEBUG "Enable debugging options (bugreports and developers only)" OFF )
+option ( ENABLE_GDB "Enable gdb debugging information" OFF )
+option ( ENABLE_PROFILE "Enable profiling options (developers only)" OFF )
+option ( ENABLE_ADDRESS_SANITIZER "enable address sanitizer support" OFF )
+option ( ENABLE_CODE_COVERAGE "Whether to enable code coverage support" OFF )
+
+# signals
+set (
+ SIGNAL_SNORT_RELOAD "SIGHUP"
+ CACHE STRING "set the SNORT_RELOAD signal (must be a valid integer or signal name)"
+)
+
+set (
+ SIGNAL_SNORT_DUMP_STATS "SIGUSR1"
+ CACHE STRING "set the SNORT_DUMP_STATS signal (must be a valid integer or signal name)"
+)
+
+set (
+ SIGNAL_SNORT_ROTATE_STATS "SIGUSR2"
+ CACHE STRING "set the SNORT_ROTATE_STATS signal (must be a valid integer or signal name)"
+)
+set (
+ SIGNAL_SNORT_READ_ATTR_TBL "SIGURG"
+ CACHE STRING "set the SNORT_READ_ATTR_TBL signal (must be a valid integer or signal name)"
+)
#Setting default directories...appended to INSTALL_PREFIX unless a full path is provided
-set (SNORT_DATA_DIR share/doc/${CMAKE_PROJECT_NAME})
+set ( SNORT_DATA_DIR share/doc/${CMAKE_PROJECT_NAME} )
/* enable piglet in build */
#cmakedefine PIGLET 1
-/* enable static piglet plugins in build */
-#cmakedefine STATIC_PIGLETS 1
-
/* Set by user */
#cmakedefine SIGNAL_SNORT_DUMP_STATS @SIGNAL_SNORT_DUMP_STATS@
#cmakedefine SIGNAL_SNORT_ROTATE_STATS @SIGNAL_SNORT_ROTATE_STATS@
/* enable ha capable build */
-#cmakedefine BUILD_SHELL 1
+#cmakedefine SHELL 1
AC_DEFINE(STATIC_CODECS, [1], [include internal decoders in binary])
fi
-AC_ARG_ENABLE(static-piglets,
- AC_HELP_STRING([--disable-static-piglets],[do not include piglets in binary]),
- static_piglets="$enableval", static_piglets="yes")
-
-AM_CONDITIONAL(STATIC_PIGLETS, [test "x$static_piglets" = "xyes"])
-
-if test "x$static_piglets" = "xyes"; then
- AC_DEFINE(STATIC_PIGLETS, [1], [include internal piglets in binary])
-fi
-
AC_ARG_ENABLE(shell,
AC_HELP_STRING([--enable-shell],[enable command line shell support]),
enable_shell="$enableval", enable_shell="no")
if test "x$enable_shell" = "xyes"; then
- AC_DEFINE(BUILD_SHELL, [1], [enable shell support])
+ AC_DEFINE(SHELL, [1], [enable shell support])
fi
AC_ARG_ENABLE(large-pcap,
AC_DEFINE(PIGLET, [1], [enable piglet test harness in build])
fi
-AM_CONDITIONAL(BUILD_PIGLET, test "x$enable_piglet" = "xyes")
+AM_CONDITIONAL(ENABLE_PIGLET, test "x$enable_piglet" = "xyes")
#--------------------------------------------------------------------------
# pcap
--disable-static-ips-options do not include ips options in binary
--disable-static-search-engines do not include search engines in binary
--disable-static-codecs do not include codecs in binary
- --disable-static-piglets do not include piglets in binary
--enable-valgrind Only use if you are testing with valgrind.
--enable-shell enable command line shell support
--enable-linux-smp-stats Enable statistics reporting through proc
--enable-static-search-engines)
append_cache_entry STATIC_SEARCH_ENGINES BOOL true
;;
- --disable-static-piglets)
- append_cache_entry STATIC_PIGLETS BOOL false
- ;;
- --enable-static-piglets)
- append_cache_entry STATIC_PIGLETS BOOL true
- ;;
--disable-static-daq)
append_cache_entry ENABLE_STATIC_DAQ BOOL false
;;
append_cache_entry BUILD_UNIT_TESTS BOOL true
;;
--disable-piglet)
- append_cache_entry BUILD_PIGLET BOOL false
+ append_cache_entry ENABLE_PIGLET BOOL false
;;
--enable-piglet)
- append_cache_entry BUILD_PIGLET BOOL true
+ append_cache_entry ENABLE_PIGLET BOOL true
;;
--disable-html-docs)
append_cache_entry MAKE_HTML_DOC BOOL false
end
}
-To run snort in piglet mode, first build snort with the BUILD_PIGLET option turned on
-(pass the flag -DBUILD_PIGLET:BOOL=ON in cmake).
+To run snort in piglet mode, first build snort with the ENABLE_PIGLET option turned on
+(pass the flag -DENABLE_PIGLET:BOOL=ON in cmake).
Then, run the following command:
endif()
if (BUILD_UNIT_TESTS)
+ enable_testing()
set( UNIT_TESTS_LIBRARIES catch_tests)
add_subdirectory(catch)
endif (BUILD_UNIT_TESTS)
-if (BUILD_PIGLET)
- set(PIGLET_LIBRARIES piglet piglet_plugins)
- add_subdirectory(piglet)
- add_subdirectory(piglet_plugins)
-endif (BUILD_PIGLET)
+if ( ENABLE_PIGLET )
+ set ( PIGLET_LIBRARIES piglet piglet_plugins )
+ add_subdirectory ( piglet )
+ add_subdirectory ( piglet_plugins )
+endif ( ENABLE_PIGLET )
# The main Snort executableRA
add_executable( snort
test_list = catch/libcatch_tests.a
endif
-if BUILD_PIGLET
+if ENABLE_PIGLET
pig_list = \
piglet/libpiglet.a \
piglet_plugins/libpiglet_plugins.a
SUBDIRS += catch
endif
-if BUILD_PIGLET
+if ENABLE_PIGLET
SUBDIRS += piglet piglet_plugins
endif
#include <string.h>
#include <time.h>
-#ifdef BUILD_SHELL
+#ifdef SHELL
#include <sys/socket.h>
#include <netinet/in.h>
#endif
static bool paused = false;
static bool pause_enabled = false;
-#ifdef BUILD_SHELL
+#ifdef SHELL
static bool shell_enabled = false;
#endif
static bool use_shell(SnortConfig* sc)
{
-#ifdef BUILD_SHELL
+#ifdef SHELL
return ( sc->run_flags & RUN_FLAG__SHELL );
#else
UNUSED(sc);
return 0;
}
-#ifdef BUILD_SHELL
+#ifdef SHELL
int main_detach(lua_State*)
{
shell_enabled = false;
// socket foo
//-------------------------------------------------------------------------
-#ifdef BUILD_SHELL
+#ifdef SHELL
// FIXIT-M make these non-blocking
// FIXIT-M allow at least 2 remote controls
// FIXIT-M bind to configured ip including INADDR_ANY
static void service_check()
{
-#ifdef BUILD_SHELL
+#ifdef SHELL
if ( service_users() )
return;
#endif
else
LogMessage("Commencing packet processing\n");
-#ifdef BUILD_SHELL
+#ifdef SHELL
if ( use_shell(snort_conf) )
{
LogMessage("Entering command shell\n");
static void snort_main()
{
-#ifdef BUILD_SHELL
+#ifdef SHELL
socket_init();
#endif
TimeStart();
pigs = nullptr;
TimeStop();
-#ifdef BUILD_SHELL
+#ifdef SHELL
socket_term();
#endif
}
int main_quit(lua_State* = nullptr);
int main_help(lua_State* = nullptr);
-#ifdef BUILD_SHELL
+#ifdef SHELL
int main_dump_plugins(lua_State* = nullptr);
int main_detach(lua_State* = nullptr);
#endif
if (cmd_line->run_flags & RUN_FLAG__PROCESS_ALL_EVENTS)
event_queue_config->process_all_events = 1;
-#ifdef BUILD_SHELL
+#ifdef SHELL
if ( cmd_line->remote_control )
remote_control = cmd_line->remote_control;
#endif
RUN_FLAG__TREAT_DROP_AS_IGNORE= 0x00100000, /* --treat-drop-as-ignore */
RUN_FLAG__PCAP_RELOAD = 0x00200000, /* --pcap-reload */
RUN_FLAG__TEST = 0x00400000, /* -T */
-#ifdef BUILD_SHELL
+#ifdef SHELL
RUN_FLAG__SHELL = 0x00800000, /* --shell */
#endif
#ifdef PIGLET
// commands
//-------------------------------------------------------------------------
-#ifdef BUILD_SHELL
+#ifdef SHELL
static const Parameter s_reload[] =
{
{ "filename", Parameter::PT_STRING, nullptr, nullptr,
{ "-i", Parameter::PT_STRING, nullptr, nullptr,
"<iface>... list of interfaces" },
-#ifdef BUILD_SHELL
+#ifdef SHELL
{ "-j", Parameter::PT_PORT, nullptr, nullptr,
"<port> to listen for telnet connections" },
#endif
{ "--script-path", Parameter::PT_STRING, nullptr, nullptr,
"<path> to a luajit script or directory containing luajit scripts" },
-#ifdef BUILD_SHELL
+#ifdef SHELL
{ "--shell", Parameter::PT_IMPLIED, nullptr, nullptr,
"enable the interactive command line", },
#endif
#define s_name "snort"
-#ifdef BUILD_SHELL
+#ifdef SHELL
#define s_help \
"command line configuration and shell commands"
#else
SnortModule() : Module(s_name, s_help, s_params)
{ }
-#ifdef BUILD_SHELL
+#ifdef SHELL
const Command* get_commands() const override
{ return snort_cmds; }
#endif
sc->daq_config->set_input_spec(v.get_string());
}
-#ifdef BUILD_SHELL
+#ifdef SHELL
else if ( v.is("-j") )
sc->remote_control = v.get_long();
#endif
else if ( v.is("--script-path") )
ConfigScriptPaths(sc, v.get_string());
-#ifdef BUILD_SHELL
+#ifdef SHELL
else if ( v.is("--shell") )
sc->run_flags |= RUN_FLAG__SHELL;
#endif