fi
fi
+PKG_PROG_PKG_CONFIG
+
#--------------------------------------------------------------------------
# api options
#--------------------------------------------------------------------------
AM_CONDITIONAL(BUILD_UNIT_TESTS, test "x$enable_unit_tests" = "xyes")
if test "x$enable_unit_tests" = "xyes"; then
- AC_CHECK_LIB(check,srunner_create)
+ PKG_CHECK_EXISTS([check], [ have_check_pkgconfig="yes" ], [ have_check_pkgconfig="no" ])
+
+ if test "${have_check_pkgconfig}" = "yes" ; then
+ CPPFLAGS="${CPPFLAGS} `pkg-config --cflags check 2>/dev/null`"
+ LIBS="${LIBS} `pkg-config --libs check 2>/dev/null`"
+ else
+ AC_CHECK_LIB(check,srunner_create)
+ fi
fi
#--------------------------------------------------------------------------
# luajit
#--------------------------------------------------------------------------
-PKG_PROG_PKG_CONFIG
-
PKG_CHECK_EXISTS([luajit], [ have_luajit_pkgconfig="yes" ], [ have_luajit_pkgconfig="no" ])
if test "${have_luajit_pkgconfig}" = "yes" ; then
if ( p->help && (!n || !strncasecmp(name, pfx, n)) )
{
cout << Markup::item();
- cout << Markup::emphasis_on();
+ cout << Markup::emphasis_on();
cout << Markup::escape(p->name);
cout << Markup::emphasis_off();
cout << " " << Markup::escape(p->help);
+
+ if ( p->has_text_range() )
+ {
+ if ( *((char*)p->range) == '(' )
+ cout << " " << (char*)p->range;
+ else
+ cout << " (" << (char*)p->range << ")";
+ }
cout << endl;
}
++p;
//-------------------------------------------------------------------------
// parameters
+//
+// users aren't used to seeing the standard help format for command line
+// args so the few cases where there is a default, we include it in the
+// help as well.
//-------------------------------------------------------------------------
static const Parameter s_params[] =
#endif
{ "-k", Parameter::PT_ENUM, "all|noip|notcp|noudp|noicmp|none", "all",
- "<mode> checksum mode (all,noip,notcp,noudp,noicmp,none)" },
+ "<mode> checksum mode; default is all" },
{ "-L", Parameter::PT_STRING, nullptr, nullptr,
"<mode> logging mode (none, dump, pcap, or log_*)" },
"<x=v> set config variable x equal to value v" },
{ "-s", Parameter::PT_INT, "68:65535", "1514",
- "<snap> (same as --snaplen)" },
+ "<snap> (same as --snaplen); default is 1514" },
{ "-T", Parameter::PT_IMPLIED, nullptr, nullptr,
"test and report on the current Snort configuration" },
{ "-z", Parameter::PT_INT, "0:", "1",
"<count> maximum number of packet threads (same as --max-packet-threads); "
- "0 gets the number of CPU cores reported by the system" },
+ "0 gets the number of CPU cores reported by the system; default is 1" },
{ "--alert-before-pass", Parameter::PT_IMPLIED, nullptr, nullptr,
"process alert, drop, sdrop, or reject before pass; "
"use drop, sdrop, and reject rules to ignore session traffic when not inline" },
#ifdef UNIT_TEST
- { "--unit-test", Parameter::PT_STRING, nullptr, nullptr,
+ { "--unit-test", Parameter::PT_SELECT,
+ "silent | minimal | normal | verbose | env (export CK_VERBOSITY)", nullptr,
"<verbosity> run unit tests with given libcheck output mode" },
#endif
{ "--version", Parameter::PT_IMPLIED, nullptr, nullptr,