diff --git a/ChangeLog b/ChangeLog index ac394d8..68aa2f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,10 +5,10 @@ 2010-09-09 Fabio "BlackLight" Manganiello * Makefile.am: Complete support for make dist -2010-09-05 Fabio "BlackLight" Manganiello +2010-05-09 Fabio "BlackLight" Manganiello * all: Using autotools now -2010-09-04 Fabio "BlackLight" Manganiello +2010-04-04 Fabio "BlackLight" Manganiello * mysql.c: This file now only contains the functions for managing MySQL connections in the database wrapper * db.c: Renamed from 'mysql.c' to 'db.c', now it should be abstract diff --git a/Makefile.am b/Makefile.am index 3b564d8..64e85c1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS=foreign no-dependencies libdir = ${exec_prefix}/lib/snort_dynamicpreprocessor lib_LTLIBRARIES = libsf_ai_preproc.la -libsf_ai_preproc_la_CFLAGS = -I./uthash -I./include ${LIBXML2_INCLUDES} -DDYNAMIC_PLUGIN -D_XOPEN_SOURCE -D_GNU_SOURCE -fvisibility=hidden -fno-strict-aliasing -Wall -pedantic -pedantic-errors -fstack-protector +libsf_ai_preproc_la_CFLAGS = -I./uthash -I./include ${LIBXML2_INCLUDES} ${LIBGRAPH_INCLUDES} -DDYNAMIC_PLUGIN -D_XOPEN_SOURCE -D_GNU_SOURCE -fvisibility=hidden -fno-strict-aliasing -Wall -pedantic -pedantic-errors -fstack-protector libsf_ai_preproc_la_LDFLAGS = -module -export-dynamic BUILT_SOURCES = \ diff --git a/Makefile.in b/Makefile.in index 8ff7363..9e0a08c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -150,6 +150,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBGRAPH_INCLUDES = @LIBGRAPH_INCLUDES@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ @@ -159,7 +160,6 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ -MYSQL = @MYSQL@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -235,7 +235,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies lib_LTLIBRARIES = libsf_ai_preproc.la -libsf_ai_preproc_la_CFLAGS = -I./uthash -I./include ${LIBXML2_INCLUDES} -DDYNAMIC_PLUGIN -D_XOPEN_SOURCE -D_GNU_SOURCE -fvisibility=hidden -fno-strict-aliasing -Wall -pedantic -pedantic-errors -fstack-protector +libsf_ai_preproc_la_CFLAGS = -I./uthash -I./include ${LIBXML2_INCLUDES} ${LIBGRAPH_INCLUDES} -DDYNAMIC_PLUGIN -D_XOPEN_SOURCE -D_GNU_SOURCE -fvisibility=hidden -fno-strict-aliasing -Wall -pedantic -pedantic-errors -fstack-protector libsf_ai_preproc_la_LDFLAGS = -module -export-dynamic BUILT_SOURCES = \ include/sf_dynamic_preproc_lib.c \ diff --git a/TODO b/TODO index 7703c4e..5b78910 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,6 @@ - Correlation macros valid also for hierarchies flags - Bayesian learning among alerts in alert log +- libgc support - Managing clusters for addresses, timestamps (and more?) - Dynamic cluster_min_size algorithm diff --git a/alert_parser.c b/alert_parser.c index 1a93bb4..b93d0e2 100644 --- a/alert_parser.c +++ b/alert_parser.c @@ -385,6 +385,9 @@ AI_free_alerts ( AI_snort_alert *node ) node->hyperalert = NULL; } + if ( node->derived_alerts ) + free ( node->derived_alerts ); + free ( node ); node = NULL; } /* ----- end of function AI_free_alerts ----- */ diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0 index d6b9e38..9a532ba 100644 --- a/autom4te.cache/output.0 +++ b/autom4te.cache/output.0 @@ -743,6 +743,7 @@ ac_includes_default="\ # include #endif" +ac_default_prefix=/usr ac_header_list= ac_func_list= ac_subst_vars='am__EXEEXT_FALSE @@ -750,7 +751,9 @@ am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS ALLOCA -MYSQL +LIBGRAPH_INCLUDES +LIBXML2_INCLUDES +CORR_RULES_PREFIX extra_incl CPP OTOOL64 @@ -868,6 +871,7 @@ enable_dependency_tracking with_gnu_ld enable_libtool_lock with_mysql +with_graphviz ' ac_precious_vars='build_alias host_alias @@ -1514,6 +1518,8 @@ Optional Packages: both@:>@ --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ --with-mysql Enable support for MySQL alert logs @<:@default=no@:>@ + --without-graphviz Disable Graphviz support for rendering correlated + alerts as a PNG graph @<:@default=yes@:>@ Some influential environment variables: CC C compiler command @@ -10527,6 +10533,9 @@ CC="$lt_save_CC" + +test "$prefix" = "NONE" && prefix=/usr + case "$host" in *-openbsd2.6|*-openbsd2.5|*-openbsd2.4|*-openbsd2.3*) @@ -11367,6 +11376,15 @@ else fi + +@%:@ Check whether --with-graphviz was given. +if test "${with_graphviz+set}" = set; then : + withval=$with_graphviz; +else + with_graphviz=yes +fi + + # Checks for libraries. if test "x$with_mysql" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_query in -lmysqlclient" >&5 @@ -11375,7 +11393,7 @@ if test "${ac_cv_lib_mysqlclient_mysql_query+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient -lmysqlclient $LIBS" +LIBS="-lmysqlclient $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11406,15 +11424,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_query" >&5 $as_echo "$ac_cv_lib_mysqlclient_mysql_query" >&6; } if test "x$ac_cv_lib_mysqlclient_mysql_query" = x""yes; then : - MYSQL="-lmysqlclient" - - + $as_echo "@%:@define ENABLE_MYSQL 1" >>confdefs.h $as_echo "@%:@define ENABLE_DB 1" >>confdefs.h - else if test "x$with_mysql" != xno; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 @@ -11426,7 +11441,63 @@ fi fi -#AC_CHECK_LIB([mysqlclient], [mysql_query]) +#AS_IF([test "x$with_graphviz" != xno], +# [AC_CHECK_LIB([gvc], [agread], +# [AC_DEFINE(ENABLE_GRAPHVIZ, 1, [Define if you want to use libgraphviz for rendering the correlated alerts graph as a PNG image])], +# [if test "x$with_graphviz" != xno; then +# AC_MSG_FAILURE([libgraphviz support required but the library was not found (use --without-graphviz if you do not want to enable the support for it)]) +# fi])]) + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlReaderForFile in -lxml2" >&5 +$as_echo_n "checking for xmlReaderForFile in -lxml2... " >&6; } +if test "${ac_cv_lib_xml2_xmlReaderForFile+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxml2 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char xmlReaderForFile (); +int +main () +{ +return xmlReaderForFile (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_xml2_xmlReaderForFile=yes +else + ac_cv_lib_xml2_xmlReaderForFile=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlReaderForFile" >&5 +$as_echo "$ac_cv_lib_xml2_xmlReaderForFile" >&6; } +if test "x$ac_cv_lib_xml2_xmlReaderForFile" = x""yes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBXML2 1 +_ACEOF + + LIBS="-lxml2 $LIBS" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libxml2 not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then : @@ -11470,10 +11541,151 @@ _ACEOF LIBS="-lpthread $LIBS" +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libpthread not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libm not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for agread in -lgvc" >&5 +$as_echo_n "checking for agread in -lgvc... " >&6; } +if test "${ac_cv_lib_gvc_agread+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgvc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char agread (); +int +main () +{ +return agread (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gvc_agread=yes +else + ac_cv_lib_gvc_agread=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gvc_agread" >&5 +$as_echo "$ac_cv_lib_gvc_agread" >&6; } +if test "x$ac_cv_lib_gvc_agread" = x""yes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBGVC 1 +_ACEOF + + LIBS="-lgvc $LIBS" + +fi + +#AC_CHECK_LIB([gvc], [agread], [AC_DEFINE(ENABLE_GRAPHVIZ, 1, [Define if you want to use libgraphviz for rendering the correlated alerts graph as a PNG image])],[]) + #[if test "x$with_graphviz" != xno; then + # AC_MSG_FAILURE([libgraphviz support required but the library was not found (use --without-graphviz if you do not want to enable the support for it or, on a Debian-based system, install libgraphviz-dev)]) + #fi]) + +if test "x$prefix" == x/usr; then : + CORR_RULES_PREFIX="/etc/snort/corr_rules" + +else + CORR_RULES_PREFIX="${prefix}/etc/corr_rules" + +fi # Checks for header files. + +if test ! -z "`pkg-config --cflags libxml-2.0 2> /dev/null`"; then : + LIBXML2_INCLUDES="$(pkg-config --cflags libxml-2.0 2> /dev/null)" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libxml2 not found, okr pkg-config not working +See \`config.log' for more details" "$LINENO" 5 ; } +fi + +if test "x$with_graphviz" != xno; then : + if test ! -z "`pkg-config --cflags libgraph 2> /dev/null`"; then : + LIBGRAPH_INCLUDES="$(pkg-config --cflags libgraph 2> /dev/null)" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libgraphviz support enabled, but the library was not found or pkg-config is not working +See \`config.log' for more details" "$LINENO" 5 ; } +fi +fi + +if test "x$with_graphviz" != xno; then : + +$as_echo "@%:@define HAVE_BOOLEAN 1" >>confdefs.h + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 @@ -11663,7 +11875,7 @@ _ACEOF fi -for ac_header in inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h +for ac_header in inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h math.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -11672,6 +11884,8 @@ if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF +else + as_fn_error $? "At least one of the required headers was not found" "$LINENO" 5 fi done @@ -11786,6 +12000,15 @@ cat >>confdefs.h <<_ACEOF _ACEOF +fi +ac_fn_c_check_type "$LINENO" "boolean" "ac_cv_type_boolean" "$ac_includes_default" +if test "x$ac_cv_type_boolean" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +@%:@define HAVE_BOOLEAN 1 +_ACEOF + + fi @@ -12404,6 +12627,8 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF +else + as_fn_error $? "At least one of the required functions was not found" "$LINENO" 5 fi done @@ -12424,7 +12649,7 @@ $as_echo "@%:@define PACKAGE_NAME \"sf_ai_preprocessor\"" >>confdefs.h $as_echo "@%:@define PACKAGE_STRING \"Snort AI preprocessor\"" >>confdefs.h -$as_echo "@%:@define PACKAGE_TARNAME \"sf_ai_preprocessor\"" >>confdefs.h +$as_echo "@%:@define PACKAGE_TARNAME \"snort_ai_preproc\"" >>confdefs.h $as_echo "@%:@define PACKAGE_VERSION \"0.1.0\"" >>confdefs.h @@ -12437,6 +12662,11 @@ $as_echo "@%:@define SUP_IP6 /**/" >>confdefs.h $as_echo "@%:@define HAVE_VISIBILITY 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +@%:@define PREFIX "${prefix}" +_ACEOF + + ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF diff --git a/autom4te.cache/output.1 b/autom4te.cache/output.1 index 14decfd..ba246c0 100644 --- a/autom4te.cache/output.1 +++ b/autom4te.cache/output.1 @@ -751,9 +751,9 @@ am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS ALLOCA +LIBGRAPH_INCLUDES LIBXML2_INCLUDES CORR_RULES_PREFIX -MYSQL extra_incl CPP OTOOL64 @@ -871,6 +871,7 @@ enable_dependency_tracking with_gnu_ld enable_libtool_lock with_mysql +with_graphviz ' ac_precious_vars='build_alias host_alias @@ -1517,6 +1518,8 @@ Optional Packages: both@:>@ --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ --with-mysql Enable support for MySQL alert logs @<:@default=no@:>@ + --without-graphviz Disable Graphviz support for rendering correlated + alerts as a PNG graph @<:@default=yes@:>@ Some influential environment variables: CC C compiler command @@ -11369,6 +11372,15 @@ else fi + +@%:@ Check whether --with-graphviz was given. +if test "${with_graphviz+set}" = set; then : + withval=$with_graphviz; +else + with_graphviz=yes +fi + + # Checks for libraries. if test "x$with_mysql" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_query in -lmysqlclient" >&5 @@ -11377,7 +11389,7 @@ if test "${ac_cv_lib_mysqlclient_mysql_query+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient -lmysqlclient $LIBS" +LIBS="-lmysqlclient $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11408,22 +11420,70 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_query" >&5 $as_echo "$ac_cv_lib_mysqlclient_mysql_query" >&6; } if test "x$ac_cv_lib_mysqlclient_mysql_query" = x""yes; then : - MYSQL="-lmysqlclient" + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBMYSQLCLIENT 1 +_ACEOF - -$as_echo "@%:@define ENABLE_MYSQL 1" >>confdefs.h + LIBS="-lmysqlclient $LIBS" - -$as_echo "@%:@define ENABLE_DB 1" >>confdefs.h - - else - if test "x$with_mysql" != xno; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "--with-mysql option used, but libmysqlclient was not found +as_fn_error $? "--with-mysql option used, but libmysqlclient was not found - do not use --with-mysql, or, on a Debian-based system, install libmysqlclient-dev +See \`config.log' for more details" "$LINENO" 5 ; } +fi + +fi + +if test "x$with_graphviz" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for agread in -lgvc" >&5 +$as_echo_n "checking for agread in -lgvc... " >&6; } +if test "${ac_cv_lib_gvc_agread+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgvc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char agread (); +int +main () +{ +return agread (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gvc_agread=yes +else + ac_cv_lib_gvc_agread=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gvc_agread" >&5 +$as_echo "$ac_cv_lib_gvc_agread" >&6; } +if test "x$ac_cv_lib_gvc_agread" = x""yes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBGVC 1 +_ACEOF + + LIBS="-lgvc $LIBS" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libgraphviz support required but the library was not found - use --without-graphviz if you do not want to enable the support for it, or, on a Debian-based system, install libgraphviz-dev See \`config.log' for more details" "$LINENO" 5 ; } - fi fi fi @@ -11471,6 +11531,11 @@ _ACEOF LIBS="-lxml2 $LIBS" +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libxml2 not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 @@ -11516,6 +11581,61 @@ _ACEOF LIBS="-lpthread $LIBS" +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libpthread not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libm not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } fi @@ -11539,6 +11659,24 @@ as_fn_error $? "libxml2 not found, okr pkg-config not working See \`config.log' for more details" "$LINENO" 5 ; } fi +if test "x$with_graphviz" != xno; then : + if test ! -z "`pkg-config --cflags libgraph 2> /dev/null`"; then : + LIBGRAPH_INCLUDES="$(pkg-config --cflags libgraph 2> /dev/null)" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libgraphviz support enabled, but the library was not found or pkg-config is not working +See \`config.log' for more details" "$LINENO" 5 ; } +fi +fi + +if test "x$with_graphviz" != xno; then : + +$as_echo "@%:@define HAVE_BOOLEAN 1" >>confdefs.h + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 @@ -11728,7 +11866,7 @@ _ACEOF fi -for ac_header in inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h +for ac_header in inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h math.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -11853,6 +11991,15 @@ cat >>confdefs.h <<_ACEOF _ACEOF +fi +ac_fn_c_check_type "$LINENO" "boolean" "ac_cv_type_boolean" "$ac_includes_default" +if test "x$ac_cv_type_boolean" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +@%:@define HAVE_BOOLEAN 1 +_ACEOF + + fi diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0 index 6e2e959..70b8dc9 100644 --- a/autom4te.cache/traces.0 +++ b/autom4te.cache/traces.0 @@ -2304,113 +2304,122 @@ m4trace:configure.ac:10: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:10: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:10: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:10: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) -m4trace:configure.ac:14: -1- m4_pattern_allow([^OPENBSD$]) -m4trace:configure.ac:15: -1- m4_pattern_allow([^BROKEN_SIOCGIFMTU$]) -m4trace:configure.ac:19: -1- m4_pattern_allow([^OPENBSD$]) -m4trace:configure.ac:23: -1- m4_pattern_allow([^IRIX$]) -m4trace:configure.ac:33: -1- m4_pattern_allow([^IRIX$]) -m4trace:configure.ac:43: -1- m4_pattern_allow([^SOLARIS$]) -m4trace:configure.ac:48: -1- m4_pattern_allow([^SUNOS$]) -m4trace:configure.ac:53: -1- m4_pattern_allow([^LINUX$]) -m4trace:configure.ac:55: -1- m4_pattern_allow([^PCAP_TIMEOUT_IGNORED$]) -m4trace:configure.ac:56: -1- m4_pattern_allow([^extra_incl$]) -m4trace:configure.ac:60: -1- m4_pattern_allow([^HPUX$]) -m4trace:configure.ac:61: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) -m4trace:configure.ac:62: -1- m4_pattern_allow([^extra_incl$]) -m4trace:configure.ac:67: -1- m4_pattern_allow([^FREEBSD$]) -m4trace:configure.ac:71: -1- m4_pattern_allow([^BSDI$]) -m4trace:configure.ac:74: -1- m4_pattern_allow([^AIX$]) -m4trace:configure.ac:77: -1- m4_pattern_allow([^OSF1$]) +m4trace:configure.ac:17: -1- m4_pattern_allow([^OPENBSD$]) +m4trace:configure.ac:18: -1- m4_pattern_allow([^BROKEN_SIOCGIFMTU$]) +m4trace:configure.ac:22: -1- m4_pattern_allow([^OPENBSD$]) +m4trace:configure.ac:26: -1- m4_pattern_allow([^IRIX$]) +m4trace:configure.ac:36: -1- m4_pattern_allow([^IRIX$]) +m4trace:configure.ac:46: -1- m4_pattern_allow([^SOLARIS$]) +m4trace:configure.ac:51: -1- m4_pattern_allow([^SUNOS$]) +m4trace:configure.ac:56: -1- m4_pattern_allow([^LINUX$]) +m4trace:configure.ac:58: -1- m4_pattern_allow([^PCAP_TIMEOUT_IGNORED$]) +m4trace:configure.ac:59: -1- m4_pattern_allow([^extra_incl$]) +m4trace:configure.ac:63: -1- m4_pattern_allow([^HPUX$]) +m4trace:configure.ac:64: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) +m4trace:configure.ac:65: -1- m4_pattern_allow([^extra_incl$]) +m4trace:configure.ac:70: -1- m4_pattern_allow([^FREEBSD$]) +m4trace:configure.ac:74: -1- m4_pattern_allow([^BSDI$]) +m4trace:configure.ac:77: -1- m4_pattern_allow([^AIX$]) m4trace:configure.ac:80: -1- m4_pattern_allow([^OSF1$]) m4trace:configure.ac:83: -1- m4_pattern_allow([^OSF1$]) -m4trace:configure.ac:87: -1- m4_pattern_allow([^MACOS$]) -m4trace:configure.ac:88: -1- m4_pattern_allow([^BROKEN_SIOCGIFMTU$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:94: -1- _AM_DEPENDENCIES([CC]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^CCDEPMODE$]) -m4trace:configure.ac:94: -1- AM_CONDITIONAL([am__fastdepCC], [ +m4trace:configure.ac:86: -1- m4_pattern_allow([^OSF1$]) +m4trace:configure.ac:90: -1- m4_pattern_allow([^MACOS$]) +m4trace:configure.ac:91: -1- m4_pattern_allow([^BROKEN_SIOCGIFMTU$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CC$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.ac:97: -1- _AM_DEPENDENCIES([CC]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^CCDEPMODE$]) +m4trace:configure.ac:97: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) -m4trace:configure.ac:94: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) -m4trace:configure.ac:94: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) -m4trace:configure.ac:94: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) -m4trace:configure.ac:95: -1- m4_pattern_allow([^LN_S$]) -m4trace:configure.ac:96: -1- m4_pattern_allow([^SET_MAKE$]) -m4trace:configure.ac:106: -1- m4_pattern_allow([^MYSQL$]) -m4trace:configure.ac:106: -1- m4_pattern_allow([^ENABLE_MYSQL$]) -m4trace:configure.ac:106: -1- m4_pattern_allow([^ENABLE_DB$]) -m4trace:configure.ac:118: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) -m4trace:configure.ac:121: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) -m4trace:configure.ac:121: -1- m4_pattern_allow([^HAVE_ALLOCA$]) -m4trace:configure.ac:121: -1- m4_pattern_allow([^ALLOCA$]) -m4trace:configure.ac:121: -1- m4_pattern_allow([^C_ALLOCA$]) -m4trace:configure.ac:121: -1- m4_pattern_allow([^CRAY_STACKSEG_END$]) -m4trace:configure.ac:121: -1- m4_pattern_allow([^STACK_DIRECTION$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_U_INT8_T$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_U_INT16_T$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_U_INT32_T$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_U_INT64_T$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_UINT8_T$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_UINT16_T$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_UINT32_T$]) -m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_UINT64_T$]) -m4trace:configure.ac:126: -1- m4_pattern_allow([^HAVE_INT8_T$]) -m4trace:configure.ac:126: -1- m4_pattern_allow([^HAVE_INT16_T$]) -m4trace:configure.ac:126: -1- m4_pattern_allow([^HAVE_INT32_T$]) -m4trace:configure.ac:126: -1- m4_pattern_allow([^HAVE_INT64_T$]) -m4trace:configure.ac:129: -1- m4_pattern_allow([^HAVE__BOOL$]) -m4trace:configure.ac:129: -1- m4_pattern_allow([^HAVE_STDBOOL_H$]) -m4trace:configure.ac:130: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:131: -1- m4_pattern_allow([^uint16_t$]) -m4trace:configure.ac:132: -1- m4_pattern_allow([^_UINT32_T$]) -m4trace:configure.ac:132: -1- m4_pattern_allow([^uint32_t$]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^_UINT8_T$]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^uint8_t$]) -m4trace:configure.ac:134: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^malloc$]) -m4trace:configure.ac:138: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.ac:138: -1- AC_DEFUN([_AC_Header_sys_time_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/time.h"])]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) +m4trace:configure.ac:97: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) +m4trace:configure.ac:97: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) +m4trace:configure.ac:97: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) +m4trace:configure.ac:98: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.ac:99: -1- m4_pattern_allow([^SET_MAKE$]) +m4trace:configure.ac:115: -1- m4_pattern_allow([^ENABLE_MYSQL$]) +m4trace:configure.ac:115: -1- m4_pattern_allow([^ENABLE_DB$]) +m4trace:configure.ac:130: -1- m4_pattern_allow([^HAVE_LIBXML2$]) +m4trace:configure.ac:131: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) +m4trace:configure.ac:132: -1- m4_pattern_allow([^HAVE_LIBM$]) +m4trace:configure.ac:133: -1- m4_pattern_allow([^HAVE_LIBGVC$]) +m4trace:configure.ac:139: -1- m4_pattern_allow([^CORR_RULES_PREFIX$]) +m4trace:configure.ac:139: -1- m4_pattern_allow([^CORR_RULES_PREFIX$]) +m4trace:configure.ac:145: -1- m4_pattern_allow([^LIBXML2_INCLUDES$]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^LIBGRAPH_INCLUDES$]) +m4trace:configure.ac:154: -1- m4_pattern_allow([^HAVE_BOOLEAN$]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^HAVE_ALLOCA$]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^ALLOCA$]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^C_ALLOCA$]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^CRAY_STACKSEG_END$]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^STACK_DIRECTION$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_U_INT8_T$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_U_INT16_T$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_U_INT32_T$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_U_INT64_T$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_UINT8_T$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_UINT16_T$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_UINT32_T$]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_UINT64_T$]) +m4trace:configure.ac:162: -1- m4_pattern_allow([^HAVE_INT8_T$]) +m4trace:configure.ac:162: -1- m4_pattern_allow([^HAVE_INT16_T$]) +m4trace:configure.ac:162: -1- m4_pattern_allow([^HAVE_INT32_T$]) +m4trace:configure.ac:162: -1- m4_pattern_allow([^HAVE_INT64_T$]) +m4trace:configure.ac:162: -1- m4_pattern_allow([^HAVE_BOOLEAN$]) +m4trace:configure.ac:165: -1- m4_pattern_allow([^HAVE__BOOL$]) +m4trace:configure.ac:165: -1- m4_pattern_allow([^HAVE_STDBOOL_H$]) +m4trace:configure.ac:166: -1- m4_pattern_allow([^size_t$]) +m4trace:configure.ac:167: -1- m4_pattern_allow([^uint16_t$]) +m4trace:configure.ac:168: -1- m4_pattern_allow([^_UINT32_T$]) +m4trace:configure.ac:168: -1- m4_pattern_allow([^uint32_t$]) +m4trace:configure.ac:169: -1- m4_pattern_allow([^_UINT8_T$]) +m4trace:configure.ac:169: -1- m4_pattern_allow([^uint8_t$]) +m4trace:configure.ac:170: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^HAVE_MALLOC$]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^HAVE_MALLOC$]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^malloc$]) +m4trace:configure.ac:174: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) +m4trace:configure.ac:174: -1- AC_DEFUN([_AC_Header_sys_time_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/time.h"])]) _AC_HEADERS_EXPANSION]) -m4trace:configure.ac:138: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])]) +m4trace:configure.ac:174: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])]) _AC_HEADERS_EXPANSION]) -m4trace:configure.ac:138: -1- AC_DEFUN([_AC_Func_alarm], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" alarm"])]) +m4trace:configure.ac:174: -1- AC_DEFUN([_AC_Func_alarm], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" alarm"])]) _AC_FUNCS_EXPANSION]) -m4trace:configure.ac:138: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:139: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:139: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:139: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:139: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:139: -1- m4_pattern_allow([^realloc$]) -m4trace:configure.ac:142: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:143: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:144: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:145: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:146: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:147: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:148: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:149: -1- m4_pattern_allow([^SUP_IP6$]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) -m4trace:configure.ac:154: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:154: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:154: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:154: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:154: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:154: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:154: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:154: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) -m4trace:configure.ac:154: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS -m4trace:configure.ac:154: -1- _LT_PROG_LTMAIN +m4trace:configure.ac:174: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_REALLOC$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_REALLOC$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^realloc$]) +m4trace:configure.ac:178: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:179: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:180: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:181: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:182: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:183: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:184: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:185: -1- m4_pattern_allow([^SUP_IP6$]) +m4trace:configure.ac:187: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) +m4trace:configure.ac:188: -1- m4_pattern_allow([^PREFIX$]) +m4trace:configure.ac:191: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:191: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:191: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:191: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:191: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:191: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:191: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:191: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) +m4trace:configure.ac:191: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS +m4trace:configure.ac:191: -1- _LT_PROG_LTMAIN diff --git a/autom4te.cache/traces.1 b/autom4te.cache/traces.1 index 910af02..941259c 100644 --- a/autom4te.cache/traces.1 +++ b/autom4te.cache/traces.1 @@ -570,304 +570,318 @@ m4trace:configure.ac:98: -1- m4_pattern_allow([^LN_S$]) m4trace:configure.ac:99: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:99: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.ac:99: -1- m4_pattern_allow([^SET_MAKE$]) -m4trace:configure.ac:109: -1- AC_SUBST([MYSQL], ["-lmysqlclient"]) -m4trace:configure.ac:109: -1- AC_SUBST_TRACE([MYSQL]) -m4trace:configure.ac:109: -1- m4_pattern_allow([^MYSQL$]) -m4trace:configure.ac:109: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_MYSQL]) -m4trace:configure.ac:109: -1- m4_pattern_allow([^ENABLE_MYSQL$]) -m4trace:configure.ac:109: -1- AH_OUTPUT([ENABLE_MYSQL], [/* Define if you want to use MySQL */ -@%:@undef ENABLE_MYSQL]) -m4trace:configure.ac:109: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_DB]) -m4trace:configure.ac:109: -1- m4_pattern_allow([^ENABLE_DB$]) -m4trace:configure.ac:109: -1- AH_OUTPUT([ENABLE_DB], [/* Define if you want to enable database support */ -@%:@undef ENABLE_DB]) -m4trace:configure.ac:120: -1- AH_OUTPUT([HAVE_LIBXML2], [/* Define to 1 if you have the `xml2\' library (-lxml2). */ +m4trace:configure.ac:115: -1- AH_OUTPUT([HAVE_LIBMYSQLCLIENT], [/* Define to 1 if you have the `mysqlclient\' library (-lmysqlclient). */ +@%:@undef HAVE_LIBMYSQLCLIENT]) +m4trace:configure.ac:115: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBMYSQLCLIENT]) +m4trace:configure.ac:115: -1- m4_pattern_allow([^HAVE_LIBMYSQLCLIENT$]) +m4trace:configure.ac:119: -1- AH_OUTPUT([HAVE_LIBGVC], [/* Define to 1 if you have the `gvc\' library (-lgvc). */ +@%:@undef HAVE_LIBGVC]) +m4trace:configure.ac:119: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBGVC]) +m4trace:configure.ac:119: -1- m4_pattern_allow([^HAVE_LIBGVC$]) +m4trace:configure.ac:123: -1- AH_OUTPUT([HAVE_LIBXML2], [/* Define to 1 if you have the `xml2\' library (-lxml2). */ @%:@undef HAVE_LIBXML2]) -m4trace:configure.ac:120: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXML2]) -m4trace:configure.ac:120: -1- m4_pattern_allow([^HAVE_LIBXML2$]) -m4trace:configure.ac:121: -1- AH_OUTPUT([HAVE_LIBPTHREAD], [/* Define to 1 if you have the `pthread\' library (-lpthread). */ +m4trace:configure.ac:123: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBXML2]) +m4trace:configure.ac:123: -1- m4_pattern_allow([^HAVE_LIBXML2$]) +m4trace:configure.ac:124: -1- AH_OUTPUT([HAVE_LIBPTHREAD], [/* Define to 1 if you have the `pthread\' library (-lpthread). */ @%:@undef HAVE_LIBPTHREAD]) -m4trace:configure.ac:121: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPTHREAD]) -m4trace:configure.ac:121: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) -m4trace:configure.ac:123: -1- AC_SUBST([CORR_RULES_PREFIX], ["/etc/snort/corr_rules"]) -m4trace:configure.ac:123: -1- AC_SUBST_TRACE([CORR_RULES_PREFIX]) -m4trace:configure.ac:123: -1- m4_pattern_allow([^CORR_RULES_PREFIX$]) -m4trace:configure.ac:123: -1- AC_SUBST([CORR_RULES_PREFIX], ["${prefix}/etc/corr_rules"]) -m4trace:configure.ac:123: -1- AC_SUBST_TRACE([CORR_RULES_PREFIX]) -m4trace:configure.ac:123: -1- m4_pattern_allow([^CORR_RULES_PREFIX$]) -m4trace:configure.ac:129: -1- AC_SUBST([LIBXML2_INCLUDES], ["$(pkg-config --cflags libxml-2.0 2> /dev/null)"]) -m4trace:configure.ac:129: -1- AC_SUBST_TRACE([LIBXML2_INCLUDES]) -m4trace:configure.ac:129: -1- m4_pattern_allow([^LIBXML2_INCLUDES$]) -m4trace:configure.ac:133: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) -m4trace:configure.ac:133: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have and it should be used (not on Ultrix). +m4trace:configure.ac:124: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBPTHREAD]) +m4trace:configure.ac:124: -1- m4_pattern_allow([^HAVE_LIBPTHREAD$]) +m4trace:configure.ac:125: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */ +@%:@undef HAVE_LIBM]) +m4trace:configure.ac:125: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM]) +m4trace:configure.ac:125: -1- m4_pattern_allow([^HAVE_LIBM$]) +m4trace:configure.ac:127: -1- AC_SUBST([CORR_RULES_PREFIX], ["/etc/snort/corr_rules"]) +m4trace:configure.ac:127: -1- AC_SUBST_TRACE([CORR_RULES_PREFIX]) +m4trace:configure.ac:127: -1- m4_pattern_allow([^CORR_RULES_PREFIX$]) +m4trace:configure.ac:127: -1- AC_SUBST([CORR_RULES_PREFIX], ["${prefix}/etc/corr_rules"]) +m4trace:configure.ac:127: -1- AC_SUBST_TRACE([CORR_RULES_PREFIX]) +m4trace:configure.ac:127: -1- m4_pattern_allow([^CORR_RULES_PREFIX$]) +m4trace:configure.ac:133: -1- AC_SUBST([LIBXML2_INCLUDES], ["$(pkg-config --cflags libxml-2.0 2> /dev/null)"]) +m4trace:configure.ac:133: -1- AC_SUBST_TRACE([LIBXML2_INCLUDES]) +m4trace:configure.ac:133: -1- m4_pattern_allow([^LIBXML2_INCLUDES$]) +m4trace:configure.ac:137: -1- AC_SUBST([LIBGRAPH_INCLUDES], ["$(pkg-config --cflags libgraph 2> /dev/null)"]) +m4trace:configure.ac:137: -1- AC_SUBST_TRACE([LIBGRAPH_INCLUDES]) +m4trace:configure.ac:137: -1- m4_pattern_allow([^LIBGRAPH_INCLUDES$]) +m4trace:configure.ac:142: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BOOLEAN]) +m4trace:configure.ac:142: -1- m4_pattern_allow([^HAVE_BOOLEAN$]) +m4trace:configure.ac:142: -1- AH_OUTPUT([HAVE_BOOLEAN], [/* Check if the boolean type is defined */ +@%:@undef HAVE_BOOLEAN]) +m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H]) +m4trace:configure.ac:145: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) +m4trace:configure.ac:145: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have and it should be used (not on Ultrix). */ @%:@undef HAVE_ALLOCA_H]) -m4trace:configure.ac:133: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^HAVE_ALLOCA$]) -m4trace:configure.ac:133: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */ +m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA]) +m4trace:configure.ac:145: -1- m4_pattern_allow([^HAVE_ALLOCA$]) +m4trace:configure.ac:145: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */ @%:@undef HAVE_ALLOCA]) -m4trace:configure.ac:133: -1- AC_LIBSOURCE([alloca.c]) -m4trace:configure.ac:133: -1- AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext]) -m4trace:configure.ac:133: -1- AC_SUBST_TRACE([ALLOCA]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^ALLOCA$]) -m4trace:configure.ac:133: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^C_ALLOCA$]) -m4trace:configure.ac:133: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */ +m4trace:configure.ac:145: -1- AC_LIBSOURCE([alloca.c]) +m4trace:configure.ac:145: -1- AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext]) +m4trace:configure.ac:145: -1- AC_SUBST_TRACE([ALLOCA]) +m4trace:configure.ac:145: -1- m4_pattern_allow([^ALLOCA$]) +m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA]) +m4trace:configure.ac:145: -1- m4_pattern_allow([^C_ALLOCA$]) +m4trace:configure.ac:145: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */ @%:@undef C_ALLOCA]) -m4trace:configure.ac:133: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^CRAY_STACKSEG_END$]) -m4trace:configure.ac:133: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP +m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END]) +m4trace:configure.ac:145: -1- m4_pattern_allow([^CRAY_STACKSEG_END$]) +m4trace:configure.ac:145: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c\' support on those systems. */ @%:@undef CRAY_STACKSEG_END]) -m4trace:configure.ac:133: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the +m4trace:configure.ac:145: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ @%:@undef STACK_DIRECTION]) -m4trace:configure.ac:133: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION]) -m4trace:configure.ac:133: -1- m4_pattern_allow([^STACK_DIRECTION$]) -m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION]) +m4trace:configure.ac:145: -1- m4_pattern_allow([^STACK_DIRECTION$]) +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) -m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_LIMITS_H]) -m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDDEF_H]) -m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) -m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) -m4trace:configure.ac:134: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_WCHAR_H]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT8_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_U_INT8_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_U_INT8_T], [/* Define to 1 if the system has the type `u_int8_t\'. */ +m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_MATH_H], [/* Define to 1 if you have the header file. */ +@%:@undef HAVE_MATH_H]) +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT8_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_U_INT8_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_U_INT8_T], [/* Define to 1 if the system has the type `u_int8_t\'. */ @%:@undef HAVE_U_INT8_T]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT16_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_U_INT16_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_U_INT16_T], [/* Define to 1 if the system has the type `u_int16_t\'. */ +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT16_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_U_INT16_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_U_INT16_T], [/* Define to 1 if the system has the type `u_int16_t\'. */ @%:@undef HAVE_U_INT16_T]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT32_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_U_INT32_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_U_INT32_T], [/* Define to 1 if the system has the type `u_int32_t\'. */ +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT32_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_U_INT32_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_U_INT32_T], [/* Define to 1 if the system has the type `u_int32_t\'. */ @%:@undef HAVE_U_INT32_T]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT64_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_U_INT64_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_U_INT64_T], [/* Define to 1 if the system has the type `u_int64_t\'. */ +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_U_INT64_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_U_INT64_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_U_INT64_T], [/* Define to 1 if the system has the type `u_int64_t\'. */ @%:@undef HAVE_U_INT64_T]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT8_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_UINT8_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_UINT8_T], [/* Define to 1 if the system has the type `uint8_t\'. */ +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT8_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_UINT8_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_UINT8_T], [/* Define to 1 if the system has the type `uint8_t\'. */ @%:@undef HAVE_UINT8_T]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT16_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_UINT16_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_UINT16_T], [/* Define to 1 if the system has the type `uint16_t\'. */ +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT16_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_UINT16_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_UINT16_T], [/* Define to 1 if the system has the type `uint16_t\'. */ @%:@undef HAVE_UINT16_T]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT32_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_UINT32_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_UINT32_T], [/* Define to 1 if the system has the type `uint32_t\'. */ +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT32_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_UINT32_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_UINT32_T], [/* Define to 1 if the system has the type `uint32_t\'. */ @%:@undef HAVE_UINT32_T]) -m4trace:configure.ac:137: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT64_T]) -m4trace:configure.ac:137: -1- m4_pattern_allow([^HAVE_UINT64_T$]) -m4trace:configure.ac:137: -1- AH_OUTPUT([HAVE_UINT64_T], [/* Define to 1 if the system has the type `uint64_t\'. */ +m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT64_T]) +m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_UINT64_T$]) +m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_UINT64_T], [/* Define to 1 if the system has the type `uint64_t\'. */ @%:@undef HAVE_UINT64_T]) -m4trace:configure.ac:138: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT8_T]) -m4trace:configure.ac:138: -1- m4_pattern_allow([^HAVE_INT8_T$]) -m4trace:configure.ac:138: -1- AH_OUTPUT([HAVE_INT8_T], [/* Define to 1 if the system has the type `int8_t\'. */ +m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT8_T]) +m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_INT8_T$]) +m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_INT8_T], [/* Define to 1 if the system has the type `int8_t\'. */ @%:@undef HAVE_INT8_T]) -m4trace:configure.ac:138: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT16_T]) -m4trace:configure.ac:138: -1- m4_pattern_allow([^HAVE_INT16_T$]) -m4trace:configure.ac:138: -1- AH_OUTPUT([HAVE_INT16_T], [/* Define to 1 if the system has the type `int16_t\'. */ +m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT16_T]) +m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_INT16_T$]) +m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_INT16_T], [/* Define to 1 if the system has the type `int16_t\'. */ @%:@undef HAVE_INT16_T]) -m4trace:configure.ac:138: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT32_T]) -m4trace:configure.ac:138: -1- m4_pattern_allow([^HAVE_INT32_T$]) -m4trace:configure.ac:138: -1- AH_OUTPUT([HAVE_INT32_T], [/* Define to 1 if the system has the type `int32_t\'. */ +m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT32_T]) +m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_INT32_T$]) +m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_INT32_T], [/* Define to 1 if the system has the type `int32_t\'. */ @%:@undef HAVE_INT32_T]) -m4trace:configure.ac:138: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT64_T]) -m4trace:configure.ac:138: -1- m4_pattern_allow([^HAVE_INT64_T$]) -m4trace:configure.ac:138: -1- AH_OUTPUT([HAVE_INT64_T], [/* Define to 1 if the system has the type `int64_t\'. */ +m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INT64_T]) +m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_INT64_T$]) +m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_INT64_T], [/* Define to 1 if the system has the type `int64_t\'. */ @%:@undef HAVE_INT64_T]) -m4trace:configure.ac:141: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL]) -m4trace:configure.ac:141: -1- m4_pattern_allow([^HAVE__BOOL$]) -m4trace:configure.ac:141: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */ +m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BOOLEAN]) +m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_BOOLEAN$]) +m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_BOOLEAN], [/* Define to 1 if the system has the type `boolean\'. */ +@%:@undef HAVE_BOOLEAN]) +m4trace:configure.ac:153: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL]) +m4trace:configure.ac:153: -1- m4_pattern_allow([^HAVE__BOOL$]) +m4trace:configure.ac:153: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */ @%:@undef HAVE__BOOL]) -m4trace:configure.ac:141: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H]) -m4trace:configure.ac:141: -1- m4_pattern_allow([^HAVE_STDBOOL_H$]) -m4trace:configure.ac:141: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */ +m4trace:configure.ac:153: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H]) +m4trace:configure.ac:153: -1- m4_pattern_allow([^HAVE_STDBOOL_H$]) +m4trace:configure.ac:153: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */ @%:@undef HAVE_STDBOOL_H]) -m4trace:configure.ac:142: -1- AC_DEFINE_TRACE_LITERAL([size_t]) -m4trace:configure.ac:142: -1- m4_pattern_allow([^size_t$]) -m4trace:configure.ac:142: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ +m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([size_t]) +m4trace:configure.ac:154: -1- m4_pattern_allow([^size_t$]) +m4trace:configure.ac:154: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ @%:@undef size_t]) -m4trace:configure.ac:143: -1- AC_DEFINE_TRACE_LITERAL([uint16_t]) -m4trace:configure.ac:143: -1- m4_pattern_allow([^uint16_t$]) -m4trace:configure.ac:143: -1- AH_OUTPUT([uint16_t], [/* Define to the type of an unsigned integer type of width exactly 16 bits if +m4trace:configure.ac:155: -1- AC_DEFINE_TRACE_LITERAL([uint16_t]) +m4trace:configure.ac:155: -1- m4_pattern_allow([^uint16_t$]) +m4trace:configure.ac:155: -1- AH_OUTPUT([uint16_t], [/* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ @%:@undef uint16_t]) -m4trace:configure.ac:144: -1- AC_DEFINE_TRACE_LITERAL([_UINT32_T]) -m4trace:configure.ac:144: -1- m4_pattern_allow([^_UINT32_T$]) -m4trace:configure.ac:144: -1- AH_OUTPUT([_UINT32_T], [/* Define for Solaris 2.5.1 so the uint32_t typedef from , +m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([_UINT32_T]) +m4trace:configure.ac:156: -1- m4_pattern_allow([^_UINT32_T$]) +m4trace:configure.ac:156: -1- AH_OUTPUT([_UINT32_T], [/* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the @%:@define below would cause a syntax error. */ @%:@undef _UINT32_T]) -m4trace:configure.ac:144: -1- AC_DEFINE_TRACE_LITERAL([uint32_t]) -m4trace:configure.ac:144: -1- m4_pattern_allow([^uint32_t$]) -m4trace:configure.ac:144: -1- AH_OUTPUT([uint32_t], [/* Define to the type of an unsigned integer type of width exactly 32 bits if +m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([uint32_t]) +m4trace:configure.ac:156: -1- m4_pattern_allow([^uint32_t$]) +m4trace:configure.ac:156: -1- AH_OUTPUT([uint32_t], [/* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ @%:@undef uint32_t]) -m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([_UINT8_T]) -m4trace:configure.ac:145: -1- m4_pattern_allow([^_UINT8_T$]) -m4trace:configure.ac:145: -1- AH_OUTPUT([_UINT8_T], [/* Define for Solaris 2.5.1 so the uint8_t typedef from , +m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([_UINT8_T]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^_UINT8_T$]) +m4trace:configure.ac:157: -1- AH_OUTPUT([_UINT8_T], [/* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the @%:@define below would cause a syntax error. */ @%:@undef _UINT8_T]) -m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([uint8_t]) -m4trace:configure.ac:145: -1- m4_pattern_allow([^uint8_t$]) -m4trace:configure.ac:145: -1- AH_OUTPUT([uint8_t], [/* Define to the type of an unsigned integer type of width exactly 8 bits if +m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([uint8_t]) +m4trace:configure.ac:157: -1- m4_pattern_allow([^uint8_t$]) +m4trace:configure.ac:157: -1- AH_OUTPUT([uint8_t], [/* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ @%:@undef uint8_t]) -m4trace:configure.ac:146: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTRDIFF_T]) -m4trace:configure.ac:146: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) -m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_PTRDIFF_T], [/* Define to 1 if the system has the type `ptrdiff_t\'. */ +m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTRDIFF_T]) +m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) +m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_PTRDIFF_T], [/* Define to 1 if the system has the type `ptrdiff_t\'. */ @%:@undef HAVE_PTRDIFF_T]) -m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:161: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) -m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) -m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and +m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) +m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_MALLOC$]) +m4trace:configure.ac:161: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and to 0 otherwise. */ @%:@undef HAVE_MALLOC]) -m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) -m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_MALLOC$]) -m4trace:configure.ac:149: -1- AC_LIBSOURCE([malloc.c]) -m4trace:configure.ac:149: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS malloc.$ac_objext"]) -m4trace:configure.ac:149: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:149: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([malloc]) -m4trace:configure.ac:149: -1- m4_pattern_allow([^malloc$]) -m4trace:configure.ac:149: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */ +m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_MALLOC$]) +m4trace:configure.ac:161: -1- AC_LIBSOURCE([malloc.c]) +m4trace:configure.ac:161: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS malloc.$ac_objext"]) +m4trace:configure.ac:161: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([malloc]) +m4trace:configure.ac:161: -1- m4_pattern_allow([^malloc$]) +m4trace:configure.ac:161: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */ @%:@undef malloc]) -m4trace:configure.ac:150: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) -m4trace:configure.ac:150: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.ac:150: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ +m4trace:configure.ac:162: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) +m4trace:configure.ac:162: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) +m4trace:configure.ac:162: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ @%:@undef TIME_WITH_SYS_TIME]) -m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:162: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TIME_H]) -m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:162: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) -m4trace:configure.ac:150: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ +m4trace:configure.ac:162: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ @%:@undef HAVE_ALARM]) -m4trace:configure.ac:150: -1- AC_LIBSOURCE([mktime.c]) -m4trace:configure.ac:150: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS mktime.$ac_objext"]) -m4trace:configure.ac:150: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:150: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:151: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.ac:162: -1- AC_LIBSOURCE([mktime.c]) +m4trace:configure.ac:162: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS mktime.$ac_objext"]) +m4trace:configure.ac:162: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:162: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:163: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) -m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) -m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:151: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function, +m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) +m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_REALLOC$]) +m4trace:configure.ac:163: -1- AH_OUTPUT([HAVE_REALLOC], [/* Define to 1 if your system has a GNU libc compatible `realloc\' function, and to 0 otherwise. */ @%:@undef HAVE_REALLOC]) -m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_REALLOC$]) -m4trace:configure.ac:151: -1- AC_LIBSOURCE([realloc.c]) -m4trace:configure.ac:151: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS realloc.$ac_objext"]) -m4trace:configure.ac:151: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([realloc]) -m4trace:configure.ac:151: -1- m4_pattern_allow([^realloc$]) -m4trace:configure.ac:151: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */ +m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALLOC]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_REALLOC$]) +m4trace:configure.ac:163: -1- AC_LIBSOURCE([realloc.c]) +m4trace:configure.ac:163: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS realloc.$ac_objext"]) +m4trace:configure.ac:163: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([realloc]) +m4trace:configure.ac:163: -1- m4_pattern_allow([^realloc$]) +m4trace:configure.ac:163: -1- AH_OUTPUT([realloc], [/* Define to rpl_realloc if the replacement function should be used. */ @%:@undef realloc]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */ @%:@undef HAVE_MEMMOVE]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ @%:@undef HAVE_MEMSET]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_REGCOMP], [/* Define to 1 if you have the `regcomp\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_REGCOMP], [/* Define to 1 if you have the `regcomp\' function. */ @%:@undef HAVE_REGCOMP]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ @%:@undef HAVE_STRCASECMP]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */ @%:@undef HAVE_STRDUP]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ @%:@undef HAVE_STRSTR]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ @%:@undef HAVE_STRTOL]) -m4trace:configure.ac:152: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ +m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ @%:@undef HAVE_STRTOUL]) -m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) -m4trace:configure.ac:154: -1- m4_pattern_allow([^VERSION$]) -m4trace:configure.ac:154: -1- AH_OUTPUT([VERSION], [/* Module version */ +m4trace:configure.ac:166: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) +m4trace:configure.ac:166: -1- m4_pattern_allow([^VERSION$]) +m4trace:configure.ac:166: -1- AH_OUTPUT([VERSION], [/* Module version */ @%:@undef VERSION]) -m4trace:configure.ac:155: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) -m4trace:configure.ac:155: -1- m4_pattern_allow([^PACKAGE$]) -m4trace:configure.ac:155: -1- AH_OUTPUT([PACKAGE], [/* Package name */ +m4trace:configure.ac:167: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) +m4trace:configure.ac:167: -1- m4_pattern_allow([^PACKAGE$]) +m4trace:configure.ac:167: -1- AH_OUTPUT([PACKAGE], [/* Package name */ @%:@undef PACKAGE]) -m4trace:configure.ac:156: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) -m4trace:configure.ac:156: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:156: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Bug report address */ +m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) +m4trace:configure.ac:168: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) +m4trace:configure.ac:168: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Bug report address */ @%:@undef PACKAGE_BUGREPORT]) -m4trace:configure.ac:157: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) -m4trace:configure.ac:157: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:157: -1- AH_OUTPUT([PACKAGE_NAME], [/* Package full name */ +m4trace:configure.ac:169: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) +m4trace:configure.ac:169: -1- m4_pattern_allow([^PACKAGE_NAME$]) +m4trace:configure.ac:169: -1- AH_OUTPUT([PACKAGE_NAME], [/* Package full name */ @%:@undef PACKAGE_NAME]) -m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) -m4trace:configure.ac:158: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:158: -1- AH_OUTPUT([PACKAGE_STRING], [/* Package string */ +m4trace:configure.ac:170: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) +m4trace:configure.ac:170: -1- m4_pattern_allow([^PACKAGE_STRING$]) +m4trace:configure.ac:170: -1- AH_OUTPUT([PACKAGE_STRING], [/* Package string */ @%:@undef PACKAGE_STRING]) -m4trace:configure.ac:159: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) -m4trace:configure.ac:159: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:159: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Package tarname */ +m4trace:configure.ac:171: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) +m4trace:configure.ac:171: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) +m4trace:configure.ac:171: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Package tarname */ @%:@undef PACKAGE_TARNAME]) -m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) -m4trace:configure.ac:160: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:160: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Package version */ +m4trace:configure.ac:172: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) +m4trace:configure.ac:172: -1- m4_pattern_allow([^PACKAGE_VERSION$]) +m4trace:configure.ac:172: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Package version */ @%:@undef PACKAGE_VERSION]) -m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([SUP_IP6]) -m4trace:configure.ac:161: -1- m4_pattern_allow([^SUP_IP6$]) -m4trace:configure.ac:161: -1- AH_OUTPUT([SUP_IP6], [/* Use SUP_IP6 */ +m4trace:configure.ac:173: -1- AC_DEFINE_TRACE_LITERAL([SUP_IP6]) +m4trace:configure.ac:173: -1- m4_pattern_allow([^SUP_IP6$]) +m4trace:configure.ac:173: -1- AH_OUTPUT([SUP_IP6], [/* Use SUP_IP6 */ @%:@undef SUP_IP6]) -m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VISIBILITY]) -m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) -m4trace:configure.ac:163: -1- AH_OUTPUT([HAVE_VISIBILITY], [/* Check if the compiler supports visibility */ +m4trace:configure.ac:175: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VISIBILITY]) +m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_VISIBILITY$]) +m4trace:configure.ac:175: -1- AH_OUTPUT([HAVE_VISIBILITY], [/* Check if the compiler supports visibility */ @%:@undef HAVE_VISIBILITY]) -m4trace:configure.ac:164: -1- AC_DEFINE_TRACE_LITERAL([PREFIX]) -m4trace:configure.ac:164: -1- m4_pattern_allow([^PREFIX$]) -m4trace:configure.ac:164: -1- AH_OUTPUT([PREFIX], [/* Installation prefix */ +m4trace:configure.ac:176: -1- AC_DEFINE_TRACE_LITERAL([PREFIX]) +m4trace:configure.ac:176: -1- m4_pattern_allow([^PREFIX$]) +m4trace:configure.ac:176: -1- AH_OUTPUT([PREFIX], [/* Installation prefix */ @%:@undef PREFIX]) -m4trace:configure.ac:166: -1- AC_CONFIG_FILES([Makefile]) -m4trace:configure.ac:167: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:167: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:167: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:167: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:167: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.ac:167: -1- AC_SUBST([am__EXEEXT_TRUE]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) -m4trace:configure.ac:167: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.ac:167: -1- AC_SUBST([am__EXEEXT_FALSE]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) -m4trace:configure.ac:167: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.ac:167: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.ac:167: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([abs_top_builddir]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([INSTALL]) -m4trace:configure.ac:167: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.ac:167: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) +m4trace:configure.ac:178: -1- AC_CONFIG_FILES([Makefile]) +m4trace:configure.ac:179: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.ac:179: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.ac:179: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.ac:179: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.ac:179: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.ac:179: -1- AC_SUBST([am__EXEEXT_TRUE]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) +m4trace:configure.ac:179: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.ac:179: -1- AC_SUBST([am__EXEEXT_FALSE]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) +m4trace:configure.ac:179: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.ac:179: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.ac:179: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([top_build_prefix]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.ac:179: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.ac:179: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) diff --git a/config.h.in b/config.h.in index eb0217f..9f5e748 100644 --- a/config.h.in +++ b/config.h.in @@ -17,12 +17,6 @@ /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA -/* Define if you want to enable database support */ -#undef ENABLE_DB - -/* Define if you want to use MySQL */ -#undef ENABLE_MYSQL - /* Define if FreeBSD */ #undef FREEBSD @@ -36,6 +30,9 @@ */ #undef HAVE_ALLOCA_H +/* Define to 1 if the system has the type `boolean'. */ +#undef HAVE_BOOLEAN + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -54,6 +51,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `gvc' library (-lgvc). */ +#undef HAVE_LIBGVC + +/* Define to 1 if you have the `m' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the `mysqlclient' library (-lmysqlclient). */ +#undef HAVE_LIBMYSQLCLIENT + /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD @@ -67,6 +73,9 @@ to 0 otherwise. */ #undef HAVE_MALLOC +/* Define to 1 if you have the header file. */ +#undef HAVE_MATH_H + /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE diff --git a/configure b/configure index f55037b..414474d 100755 --- a/configure +++ b/configure @@ -751,9 +751,9 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS ALLOCA +LIBGRAPH_INCLUDES LIBXML2_INCLUDES CORR_RULES_PREFIX -MYSQL extra_incl CPP OTOOL64 @@ -871,6 +871,7 @@ enable_dependency_tracking with_gnu_ld enable_libtool_lock with_mysql +with_graphviz ' ac_precious_vars='build_alias host_alias @@ -1517,6 +1518,8 @@ Optional Packages: both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-mysql Enable support for MySQL alert logs [default=no] + --without-graphviz Disable Graphviz support for rendering correlated + alerts as a PNG graph [default=yes] Some influential environment variables: CC C compiler command @@ -4582,13 +4585,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4585: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4588: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4588: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4591: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4591: output\"" >&5) + (eval echo "\"\$as_me:4594: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -5794,7 +5797,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5797 "configure"' > conftest.$ac_ext + echo '#line 5800 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7319,11 +7322,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7322: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7325: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7326: \$? = $ac_status" >&5 + echo "$as_me:7329: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7658,11 +7661,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7661: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7664: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7665: \$? = $ac_status" >&5 + echo "$as_me:7668: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7763,11 +7766,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7766: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7769: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7770: \$? = $ac_status" >&5 + echo "$as_me:7773: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -7818,11 +7821,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7821: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7824: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7825: \$? = $ac_status" >&5 + echo "$as_me:7828: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10202,7 +10205,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10205 "configure" +#line 10208 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10298,7 +10301,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10301 "configure" +#line 10304 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11369,6 +11372,15 @@ else fi + +# Check whether --with-graphviz was given. +if test "${with_graphviz+set}" = set; then : + withval=$with_graphviz; +else + with_graphviz=yes +fi + + # Checks for libraries. if test "x$with_mysql" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql_query in -lmysqlclient" >&5 @@ -11377,7 +11389,7 @@ if test "${ac_cv_lib_mysqlclient_mysql_query+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lmysqlclient -lmysqlclient $LIBS" +LIBS="-lmysqlclient $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11408,22 +11420,70 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mysqlclient_mysql_query" >&5 $as_echo "$ac_cv_lib_mysqlclient_mysql_query" >&6; } if test "x$ac_cv_lib_mysqlclient_mysql_query" = x""yes; then : - MYSQL="-lmysqlclient" - - -$as_echo "#define ENABLE_MYSQL 1" >>confdefs.h - - -$as_echo "#define ENABLE_DB 1" >>confdefs.h + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMYSQLCLIENT 1 +_ACEOF + LIBS="-lmysqlclient $LIBS" else - if test "x$with_mysql" != xno; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "--with-mysql option used, but libmysqlclient was not found +as_fn_error $? "--with-mysql option used, but libmysqlclient was not found - do not use --with-mysql, or, on a Debian-based system, install libmysqlclient-dev +See \`config.log' for more details" "$LINENO" 5 ; } +fi + +fi + +if test "x$with_graphviz" != xno; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for agread in -lgvc" >&5 +$as_echo_n "checking for agread in -lgvc... " >&6; } +if test "${ac_cv_lib_gvc_agread+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgvc $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char agread (); +int +main () +{ +return agread (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gvc_agread=yes +else + ac_cv_lib_gvc_agread=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gvc_agread" >&5 +$as_echo "$ac_cv_lib_gvc_agread" >&6; } +if test "x$ac_cv_lib_gvc_agread" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBGVC 1 +_ACEOF + + LIBS="-lgvc $LIBS" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libgraphviz support required but the library was not found - use --without-graphviz if you do not want to enable the support for it, or, on a Debian-based system, install libgraphviz-dev See \`config.log' for more details" "$LINENO" 5 ; } - fi fi fi @@ -11471,6 +11531,11 @@ _ACEOF LIBS="-lxml2 $LIBS" +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libxml2 not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 @@ -11516,6 +11581,61 @@ _ACEOF LIBS="-lpthread $LIBS" +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libpthread not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 +_ACEOF + + LIBS="-lm $LIBS" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libm not found on the system +See \`config.log' for more details" "$LINENO" 5 ; } fi @@ -11539,6 +11659,24 @@ as_fn_error $? "libxml2 not found, okr pkg-config not working See \`config.log' for more details" "$LINENO" 5 ; } fi +if test "x$with_graphviz" != xno; then : + if test ! -z "`pkg-config --cflags libgraph 2> /dev/null`"; then : + LIBGRAPH_INCLUDES="$(pkg-config --cflags libgraph 2> /dev/null)" + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "libgraphviz support enabled, but the library was not found or pkg-config is not working +See \`config.log' for more details" "$LINENO" 5 ; } +fi +fi + +if test "x$with_graphviz" != xno; then : + +$as_echo "#define HAVE_BOOLEAN 1" >>confdefs.h + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 @@ -11728,7 +11866,7 @@ _ACEOF fi -for ac_header in inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h +for ac_header in inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h math.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -11853,6 +11991,15 @@ cat >>confdefs.h <<_ACEOF _ACEOF +fi +ac_fn_c_check_type "$LINENO" "boolean" "ac_cv_type_boolean" "$ac_includes_default" +if test "x$ac_cv_type_boolean" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_BOOLEAN 1 +_ACEOF + + fi diff --git a/configure.ac b/configure.ac index 1b97ca3..b4b666a 100644 --- a/configure.ac +++ b/configure.ac @@ -105,20 +105,24 @@ AC_ARG_WITH(mysql, [with_mysql=yes], [with_mysql=no]) +AC_ARG_WITH(graphviz, + AS_HELP_STRING([--without-graphviz], + [Disable Graphviz support for rendering correlated alerts as a PNG graph @<:@default=yes@:>@]), + [], + [with_graphviz=yes]) + # Checks for libraries. AS_IF([test "x$with_mysql" != xno], - [AC_CHECK_LIB([mysqlclient], [mysql_query], - [AC_SUBST([MYSQL], ["-lmysqlclient"]) - AC_DEFINE(ENABLE_MYSQL, 1, [Define if you want to use MySQL]) - AC_DEFINE(ENABLE_DB, 1, [Define if you want to enable database support]) - ], - [if test "x$with_mysql" != xno; then - AC_MSG_FAILURE([--with-mysql option used, but libmysqlclient was not found]) - fi], - -lmysqlclient)]) + [AC_CHECK_LIB([mysqlclient], [mysql_query],, + [AC_MSG_FAILURE([--with-mysql option used, but libmysqlclient was not found - do not use --with-mysql, or, on a Debian-based system, install libmysqlclient-dev])])]) -AC_CHECK_LIB([xml2], [xmlReaderForFile]) -AC_CHECK_LIB([pthread], [pthread_create]) +AS_IF([test "x$with_graphviz" != xno], + [AC_CHECK_LIB([gvc], [agread],, + [AC_MSG_FAILURE([libgraphviz support required but the library was not found - use --without-graphviz if you do not want to enable the support for it, or, on a Debian-based system, install libgraphviz-dev])])]) + +AC_CHECK_LIB([xml2], [xmlReaderForFile],, AC_MSG_FAILURE(libxml2 not found on the system)) +AC_CHECK_LIB([pthread], [pthread_create],, AC_MSG_FAILURE(libpthread not found on the system)) +AC_CHECK_LIB([m], [sqrt],, AC_MSG_FAILURE(libm not found on the system)) AS_IF([test "x$prefix" == x/usr], [AC_SUBST([CORR_RULES_PREFIX], ["/etc/snort/corr_rules"])], @@ -130,12 +134,20 @@ AS_IF([test ! -z "`pkg-config --cflags libxml-2.0 2> /dev/null`"], [AC_SUBST([LIBXML2_INCLUDES], ["$(pkg-config --cflags libxml-2.0 2> /dev/null)"])], [AC_MSG_FAILURE([libxml2 not found, okr pkg-config not working])]) +AS_IF([test "x$with_graphviz" != xno], + [AS_IF([test ! -z "`pkg-config --cflags libgraph 2> /dev/null`"], + [AC_SUBST([LIBGRAPH_INCLUDES], ["$(pkg-config --cflags libgraph 2> /dev/null)"])], + [AC_MSG_FAILURE([libgraphviz support enabled, but the library was not found or pkg-config is not working])])]) + +AS_IF([test "x$with_graphviz" != xno], + [AC_DEFINE([HAVE_BOOLEAN], [1], [Check if the boolean type is defined])]) + AC_FUNC_ALLOCA -AC_CHECK_HEADERS([inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h],,AC_MSG_ERROR(At least one of the required headers was not found)) +AC_CHECK_HEADERS([inttypes.h limits.h stddef.h stdlib.h string.h unistd.h wchar.h math.h],,AC_MSG_ERROR(At least one of the required headers was not found)) # Check for int types AC_CHECK_TYPES([u_int8_t,u_int16_t,u_int32_t,u_int64_t,uint8_t,uint16_t,uint32_t,uint64_t]) -AC_CHECK_TYPES([int8_t,int16_t,int32_t,int64_t]) +AC_CHECK_TYPES([int8_t,int16_t,int32_t,int64_t,boolean]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL diff --git a/corr_rules/1-1394-12.xml b/corr_rules/1-1394-12.xml new file mode 100644 index 0000000..77cca0f --- /dev/null +++ b/corr_rules/1-1394-12.xml @@ -0,0 +1,13 @@ + + + + + 1.1394.12 + Shellcode x86 inc ecx noop + +
HostExists(+DST_ADDR+)
+
HasService(+DST_ADDR+, +DST_PORT+)
+ + HasLocalAccess(+SRC_ADDR+, +DST_ADDR+) +
+ diff --git a/corr_rules/1-469-4.xml b/corr_rules/1-469-4.xml index a50f5eb..3d56a42 100644 --- a/corr_rules/1-469-4.xml +++ b/corr_rules/1-469-4.xml @@ -1,8 +1,9 @@ - + 1.469.4 + ICMP PING NMAP HostExists(+DST_ADDR+) diff --git a/corr_rules/122-1-0.xml b/corr_rules/122-1-0.xml index 3af5755..a7ba04e 100644 --- a/corr_rules/122-1-0.xml +++ b/corr_rules/122-1-0.xml @@ -1,9 +1,11 @@ - + 122.1.0 + (portscan) TCP Portscan +
HostExists(+DST_ADDR+)
- HasVulnService(+DST_ADDR+, +ANY_PORT+) + HasService(+DST_ADDR+, +ANY_PORT+)
diff --git a/correlation.c b/correlation.c index be3b037..a1fbaf2 100644 --- a/correlation.c +++ b/correlation.c @@ -19,34 +19,51 @@ #include "spp_ai.h" +#include +#include +#include #include +#include +#include +#include #include #include #include +#ifdef HAVE_LIBGVC + #include +#endif + /** \defgroup correlation Module for the correlation of hyperalerts * @{ */ #ifndef LIBXML_READER_ENABLED -#error "libxml reader not enabled\n" +#error "libxml2 reader not enabled\n" #endif /** Enumeration for the types of XML tags */ enum { inHyperAlert, inSnortIdTag, inPreTag, inPostTag, TAG_NUM }; -/** Struct representing the correlation between all the couples of alerts */ +/** Key for the correlation hash table */ typedef struct { /** First alert */ AI_snort_alert *a; /** Second alert */ AI_snort_alert *b; +} AI_alert_correlation_key; + + +/** Struct representing the correlation between all the couples of alerts */ +typedef struct { + /** Hash key */ + AI_alert_correlation_key key; /** Correlation coefficient */ - double correlation; + double correlation; /** Make the struct 'hashable' */ - UT_hash_handle hh; + UT_hash_handle hh; } AI_alert_correlation; PRIVATE AI_hyperalert_info *hyperalerts = NULL; @@ -55,6 +72,195 @@ PRIVATE AI_snort_alert *alerts = NULL; PRIVATE AI_alert_correlation *correlation_table = NULL; PRIVATE BOOL lock_flag = false; +/** + * \brief Clean up the correlation hash table + */ +PRIVATE void +_AI_correlation_table_cleanup () +{ + AI_alert_correlation *current; + + while ( correlation_table ) + { + current = correlation_table; + HASH_DEL ( correlation_table, current ); + free ( current ); + } +} /* ----- end of function _AI_correlation_table_cleanup ----- */ + +/** + * \brief Recursively write a flow of correlated alerts to a .dot file, ready for being rendered as graph + * \param corr_alerts Correlated alerts + * \param fp File pointer + */ +PRIVATE void +_AI_print_correlated_alerts ( AI_alert_correlation *corr, FILE *fp ) +{ + char src_addr1[INET_ADDRSTRLEN], + dst_addr1[INET_ADDRSTRLEN], + src_addr2[INET_ADDRSTRLEN], + dst_addr2[INET_ADDRSTRLEN], + src_port1[10], + dst_port1[10], + src_port2[10], + dst_port2[10], + timestamp1[40], + timestamp2[40]; + + struct tm *t1, *t2; + + if ( !corr ) + return; + + inet_ntop ( AF_INET, &(corr->key.a->ip_src_addr), src_addr1, INET_ADDRSTRLEN ); + inet_ntop ( AF_INET, &(corr->key.a->ip_dst_addr), dst_addr1, INET_ADDRSTRLEN ); + + snprintf ( src_port1, sizeof ( src_port1 ), "%d", ntohs ( corr->key.a->tcp_src_port )); + snprintf ( dst_port1, sizeof ( dst_port1 ), "%d", ntohs ( corr->key.a->tcp_dst_port )); + + t1 = localtime ( &(corr->key.a->timestamp )); + strftime ( timestamp1, sizeof ( timestamp1 ), "%a %b %d %Y, %H:%M:%S", t1 ); + + inet_ntop ( AF_INET, &(corr->key.b->ip_src_addr), src_addr2, INET_ADDRSTRLEN ); + inet_ntop ( AF_INET, &(corr->key.b->ip_dst_addr), dst_addr2, INET_ADDRSTRLEN ); + + snprintf ( src_port2, sizeof ( src_port2 ), "%d", ntohs ( corr->key.b->tcp_src_port )); + snprintf ( dst_port2, sizeof ( dst_port2 ), "%d", ntohs ( corr->key.b->tcp_dst_port )); + + t2 = localtime ( &(corr->key.b->timestamp )); + strftime ( timestamp2, sizeof ( timestamp2 ), "%a %b %d %Y, %H:%M:%S", t2 ); + + fprintf ( fp, + "\t\"[%d.%d.%d] %s\\n" + "%s%s%s:%s%s%s -> %s%s%s:%s%s%s\\n" + "%s\\n" + "(%d alerts grouped)\" -> " + + "\"[%d.%d.%d] %s\\n" + "%s%s%s:%s%s%s -> %s%s%s:%s%s%s\\n" + "%s\\n" + "(%d alerts grouped)\";\n", + + corr->key.a->gid, corr->key.a->sid, corr->key.a->rev, corr->key.a->desc, + + ( corr->key.a->h_node[src_addr] ) ? "[" : "", + ( corr->key.a->h_node[src_addr] ) ? corr->key.a->h_node[src_addr]->label : src_addr1, + ( corr->key.a->h_node[src_addr] ) ? "]" : "", + + ( corr->key.a->h_node[src_port] ) ? "[" : "", + ( corr->key.a->h_node[src_port] ) ? corr->key.a->h_node[src_port]->label : src_port1, + ( corr->key.a->h_node[src_port] ) ? "]" : "", + + ( corr->key.a->h_node[dst_addr] ) ? "[" : "", + ( corr->key.a->h_node[dst_addr] ) ? corr->key.a->h_node[dst_addr]->label : dst_addr1, + ( corr->key.a->h_node[dst_addr] ) ? "]" : "", + + ( corr->key.a->h_node[dst_port] ) ? "[" : "", + ( corr->key.a->h_node[dst_port] ) ? corr->key.a->h_node[dst_port]->label : dst_port1, + ( corr->key.a->h_node[dst_port] ) ? "]" : "", + + timestamp1, + corr->key.a->grouped_alarms_count, + + + corr->key.b->gid, corr->key.b->sid, corr->key.b->rev, corr->key.b->desc, + + ( corr->key.b->h_node[src_addr] ) ? "[" : "", + ( corr->key.b->h_node[src_addr] ) ? corr->key.b->h_node[src_addr]->label : src_addr2, + ( corr->key.b->h_node[src_addr] ) ? "]" : "", + + ( corr->key.b->h_node[src_port] ) ? "[" : "", + ( corr->key.b->h_node[src_port] ) ? corr->key.b->h_node[src_port]->label : src_port2, + ( corr->key.b->h_node[src_port] ) ? "]" : "", + + ( corr->key.b->h_node[dst_addr] ) ? "[" : "", + ( corr->key.b->h_node[dst_addr] ) ? corr->key.b->h_node[dst_addr]->label : dst_addr2, + ( corr->key.b->h_node[dst_addr] ) ? "]" : "", + + ( corr->key.b->h_node[dst_port] ) ? "[" : "", + ( corr->key.b->h_node[dst_port] ) ? corr->key.b->h_node[dst_port]->label : dst_port2, + ( corr->key.b->h_node[dst_port] ) ? "]" : "", + + timestamp2, + corr->key.b->grouped_alarms_count + ); +} /* ----- end of function _AI_correlation_flow_to_file ----- */ + + +/** + * \brief Get the name of the function called by a pre-condition or post-condition predicate + * \param orig_stmt Statement representing a pre-condition or post-condition + * \return The name of the function called by that statement + */ +PRIVATE char* +_AI_get_function_name ( const char *orig_stmt ) +{ + int parenthesis_pos, function_name_len; + char function_name[4096]; + char *stmt = NULL; + + if ( !( stmt = (char*) alloca ( strlen ( orig_stmt )))) + return NULL; + strcpy ( stmt, orig_stmt ); + + memset ( function_name, 0, sizeof ( function_name )); + + if ( !( parenthesis_pos = (int) strstr ( stmt, "(" ))) + return NULL; + + parenthesis_pos -= (int) stmt; + function_name_len = ( parenthesis_pos < sizeof ( function_name )) ? parenthesis_pos : sizeof ( function_name ); + strncpy ( function_name, stmt, function_name_len ); + + return strdup(function_name); +} /* ----- end of function _AI_get_function_name ----- */ + + +/** + * FUNCTION: _AI_get_function_arguments + * \brief Get the arguments passed to a function predicate in a pre-condition or post-condition (comma-separated values) + * \param origstmt Statement representing a pre-condition or post-condition + * \param n_args Reference to an integer that will contain the number of arguments read + * \return An array of strings containing the arguments of the function + */ +PRIVATE char** +_AI_get_function_arguments ( char *orig_stmt, int *n_args ) +{ + char **args = NULL; + char *tok = NULL; + char *stmt = NULL; + int par_pos = 0; + *n_args = 0; + + if ( !( stmt = (char*) alloca ( strlen ( orig_stmt )))) + return NULL; + strcpy ( stmt, orig_stmt ); + + if ( !( par_pos = (int) strstr ( stmt, "(" ))) + return NULL; + + par_pos -= (int) stmt; + stmt += par_pos + 1; + + if ( stmt [ strlen(stmt) - 1 ] == ')' ) + stmt[ strlen(stmt) - 1 ] = 0; + + tok = (char*) strtok ( stmt, "," ); + + while ( tok ) { + if ( !( args = (char**) realloc ( args, (++(*n_args)) * sizeof ( char* )))) + _dpd.fatalMsg ( "AIPreproc: Fatal memory allocation error at %s:%d\n", __FILE__, __LINE__ ); + + args [ (*n_args) - 1 ] = strdup ( tok ); + tok = (char*) strtok ( NULL, " " ); + } + + if ( !(*n_args) ) + return NULL; + + return args; +} /* ----- end of function _AI_get_function_arguments ----- */ + /** * \brief Compute the correlation coefficient between two alerts, as #INTERSECTION(pre(B), post(A) / #UNION(pre(B), post(A)) * \param a Alert a @@ -62,13 +268,23 @@ PRIVATE BOOL lock_flag = false; * \return The correlation coefficient between A and B as coefficient in [0,1] */ -double +PRIVATE double _AI_correlation_coefficient ( AI_snort_alert *a, AI_snort_alert *b ) { - unsigned int i, j, + unsigned int i, j, k, n_intersection = 0, n_union = 0; + char **args1 = NULL, + **args2 = NULL, + *function_name1 = NULL, + *function_name2 = NULL, + new_stmt1[4096] = {0}, + new_stmt2[4096] = {0}; + + int n_args1 = 0, + n_args2 = 0; + if ( !a->hyperalert || !b->hyperalert ) return 0.0; @@ -84,6 +300,100 @@ _AI_correlation_coefficient ( AI_snort_alert *a, AI_snort_alert *b ) if ( !strcasecmp ( a->hyperalert->postconds[i], b->hyperalert->preconds[j] )) { n_intersection += 2; + } else { + /* Check if the predicates are the same, have the same number of arguments, and + * substitute possible occurrencies of +ANY_ADDR+ and +ANY_PORT+ */ + function_name1 = _AI_get_function_name ( a->hyperalert->postconds[i] ); + function_name2 = _AI_get_function_name ( b->hyperalert->preconds[j] ); + + if ( !strcasecmp ( function_name1, function_name2 )) + { + args1 = _AI_get_function_arguments ( a->hyperalert->postconds[i], &n_args1 ); + args2 = _AI_get_function_arguments ( b->hyperalert->preconds[j] , &n_args2 ); + + if ( args1 && args2 ) + { + if ( n_args1 == n_args2 ) + { + memset ( new_stmt1, 0, sizeof ( new_stmt1 )); + memset ( new_stmt2, 0, sizeof ( new_stmt2 )); + + for ( k=0; k < n_args1; k++ ) + { + if ( !strcasecmp ( args1[k], "+ANY_ADDR+" ) || !strcasecmp ( args1[k], "+ANY_PORT+" )) + { + free ( args1[k] ); + args1[k] = args2[k]; + } + + if ( !strcasecmp ( args2[k], "+ANY_ADDR+" ) || !strcasecmp ( args2[k], "+ANY_PORT+" )) + { + free ( args2[k] ); + args2[k] = args1[k]; + } + } + + snprintf ( new_stmt1, sizeof ( new_stmt1 ), "%s(", function_name1 ); + snprintf ( new_stmt2, sizeof ( new_stmt2 ), "%s(", function_name2 ); + + for ( k=0; k < n_args1; k++ ) + { + if ( strlen ( new_stmt1 ) + strlen ( args1[k] ) + 1 < sizeof ( new_stmt1 )) + sprintf ( new_stmt1, "%s%s%s", new_stmt1, args1[k], ( k < n_args1 - 1 ) ? "," : ")" ); + + if ( strlen ( new_stmt2 ) + strlen ( args2[k] ) + 1 < sizeof ( new_stmt2 )) + sprintf ( new_stmt2, "%s%s%s", new_stmt2, args2[k], ( k < n_args2 - 1 ) ? "," : ")" ); + } + + if ( !strcmp ( new_stmt1, new_stmt2 )) + { + n_intersection += 2; + } + } + + for ( k=0; k < n_args1; k++ ) + { + if ( args1[k] ) + { + free ( args1[k] ); + args1[k] = NULL; + } + } + + if ( args1 ) + { + free ( args1 ); + args1 = NULL; + } + + for ( k=0; k < n_args2; k++ ) + { + if ( args2[k] ) + { + /* free ( args2[k] ); */ + args2[k] = NULL; + } + } + + if ( args2 ) + { + free ( args2 ); + args2 = NULL; + } + } + } + + if ( function_name1 ) + { + free ( function_name1 ); + function_name1 = NULL; + } + + if ( function_name2 ) + { + free ( function_name2 ); + function_name2 = NULL; + } } } } @@ -91,12 +401,13 @@ _AI_correlation_coefficient ( AI_snort_alert *a, AI_snort_alert *b ) return (double) ((double) n_intersection / (double) n_union ); } /* ----- end of function _AI_correlation_coefficient ----- */ + /** * \brief Substitute the macros in hyperalert pre-conditions and post-conditions with their associated values * \param alert Reference to the hyperalert to work on */ -void +PRIVATE void _AI_macro_subst ( AI_snort_alert **alert ) { /* @@ -130,12 +441,6 @@ _AI_macro_subst ( AI_snort_alert **alert ) free ( tmp ); } - if ( strstr ( (*alert)->hyperalert->preconds[i], "+ANY_ADDR+" )) { - tmp = (*alert)->hyperalert->preconds[i]; - (*alert)->hyperalert->preconds[i] = str_replace ( (*alert)->hyperalert->preconds[i], "+ANY_ADDR+", "0.0.0.0" ); - free ( tmp ); - } - if ( strstr ( (*alert)->hyperalert->preconds[i], "+SRC_PORT+" )) { snprintf ( src_port, sizeof ( src_port ), "%d", ntohs ((*alert)->tcp_src_port) ); tmp = (*alert)->hyperalert->preconds[i]; @@ -149,12 +454,6 @@ _AI_macro_subst ( AI_snort_alert **alert ) (*alert)->hyperalert->preconds[i] = str_replace ( (*alert)->hyperalert->preconds[i], "+DST_PORT+", dst_port ); free ( tmp ); } - - if ( strstr ( (*alert)->hyperalert->preconds[i], "+ANY_PORT+" )) { - tmp = (*alert)->hyperalert->preconds[i]; - (*alert)->hyperalert->preconds[i] = str_replace ( (*alert)->hyperalert->preconds[i], "+ANY_PORT+", "0" ); - free ( tmp ); - } } for ( i=0; i < (*alert)->hyperalert->n_postconds; i++ ) @@ -178,11 +477,11 @@ _AI_macro_subst ( AI_snort_alert **alert ) free ( tmp ); } - if ( strstr ( (*alert)->hyperalert->postconds[i], "+ANY_ADDR+" )) { - tmp = (*alert)->hyperalert->postconds[i]; - (*alert)->hyperalert->postconds[i] = str_replace ( (*alert)->hyperalert->postconds[i], "+ANY_ADDR+", "0.0.0.0" ); - free ( tmp ); - } + /* if ( strstr ( (*alert)->hyperalert->postconds[i], "+ANY_ADDR+" )) { */ + /* tmp = (*alert)->hyperalert->postconds[i]; */ + /* (*alert)->hyperalert->postconds[i] = str_replace ( (*alert)->hyperalert->postconds[i], "+ANY_ADDR+", "0.0.0.0" ); */ + /* free ( tmp ); */ + /* } */ if ( strstr ( (*alert)->hyperalert->postconds[i], "+SRC_PORT+" )) { snprintf ( src_port, sizeof ( src_port ), "%d", ntohs ((*alert)->tcp_src_port) ); @@ -198,11 +497,11 @@ _AI_macro_subst ( AI_snort_alert **alert ) free ( tmp ); } - if ( strstr ( (*alert)->hyperalert->postconds[i], "+ANY_PORT+" )) { - tmp = (*alert)->hyperalert->postconds[i]; - (*alert)->hyperalert->postconds[i] = str_replace ( (*alert)->hyperalert->postconds[i], "+ANY_PORT+", "0" ); - free ( tmp ); - } + /* if ( strstr ( (*alert)->hyperalert->postconds[i], "+ANY_PORT+" )) { */ + /* tmp = (*alert)->hyperalert->postconds[i]; */ + /* (*alert)->hyperalert->postconds[i] = str_replace ( (*alert)->hyperalert->postconds[i], "+ANY_PORT+", "0" ); */ + /* free ( tmp ); */ + /* } */ } } /* ----- end of function _AI_macro_subst ----- */ @@ -277,7 +576,8 @@ _AI_hyperalert_from_XML ( AI_hyperalert_key key ) _dpd.fatalMsg ( "AIPreproc: Error in XML file '%s': 'post' tag open outside of 'hyperalert' tag\n", hyperalert_file ); else xmlFlags[inPostTag] = true; - } else { + } else if ( !strcasecmp ((const char*) tagname, "desc" )) {} + else { _dpd.fatalMsg ( "AIPreproc: Unrecognized tag '%s' in XML file '%s'\n", tagname, hyperalert_file ); } } else if ( xmlTextReaderNodeType ( xml ) == XML_READER_TYPE_END_ELEMENT ) { @@ -302,7 +602,8 @@ _AI_hyperalert_from_XML ( AI_hyperalert_key key ) _dpd.fatalMsg ( "AIPreproc: Error in XML file '%s': post tag closed but never opend\n", hyperalert_file ); else xmlFlags[inPostTag] = false; - } else { + } else if ( !strcasecmp ((const char*) tagname, "desc" )) {} + else { _dpd.fatalMsg ( "AIPreproc: Unrecognized tag '%s' in XML file '%s'\n", tagname, hyperalert_file ); } } else if ( xmlTextReaderNodeType ( xml ) == XML_READER_TYPE_TEXT ) { @@ -350,15 +651,30 @@ _AI_hyperalert_from_XML ( AI_hyperalert_key key ) void* AI_alert_correlation_thread ( void *arg ) { - int i; - struct stat st; - AI_hyperalert_key key; - AI_hyperalert_info *hyp = NULL; - AI_snort_alert *alert_iterator = NULL, - *alert_iterator2 = NULL; + int i; + struct stat st; + char corr_dot_file[4096] = { 0 }; - FILE *fp = fopen ( "/home/blacklight/LOG", "w" ); - fclose ( fp ); + double avg_correlation = 0.0, + std_deviation = 0.0, + corr_threshold = 0.0; + + FILE *fp = NULL; + + AI_alert_correlation_key corr_key; + AI_alert_correlation *corr = NULL; + + AI_hyperalert_key key; + AI_hyperalert_info *hyp = NULL; + + AI_snort_alert *alert_iterator = NULL, + *alert_iterator2 = NULL; + + #ifdef HAVE_LIBGVC + char corr_png_file[4096] = { 0 }; + GVC_t *gvc = NULL; + graph_t *g = NULL; + #endif conf = (AI_config*) arg; @@ -431,20 +747,109 @@ AI_alert_correlation_thread ( void *arg ) _AI_macro_subst ( &alert_iterator ); } + _AI_correlation_table_cleanup(); + correlation_table = NULL; + for ( alert_iterator = alerts; alert_iterator; alert_iterator = alert_iterator->next ) { for ( alert_iterator2 = alerts; alert_iterator2; alert_iterator2 = alert_iterator2->next ) { - if ( alert_iterator != alert_iterator2 ) + if ( alert_iterator != alert_iterator2 && ! ( + alert_iterator->gid == alert_iterator2->gid && + alert_iterator->sid == alert_iterator2->sid && + alert_iterator->rev == alert_iterator2->rev )) { - fp = fopen ( "/home/blacklight/LOG", "a" ); - fprintf ( fp, "alert1: (%s), alert2: (%s)\n", alert_iterator->desc, alert_iterator2->desc ); - fprintf ( fp, "correlation (alert1, alert2): %f\n\n", _AI_correlation_coefficient ( alert_iterator, alert_iterator2 )); - fclose ( fp ); + if ( !( corr = ( AI_alert_correlation* ) malloc ( sizeof ( AI_alert_correlation )))) + _dpd.fatalMsg ( "AIPreproc: Fatal memory allocation error at %s:%d\n", __FILE__, __LINE__ ); + + corr_key.a = alert_iterator; + corr_key.b = alert_iterator2; + + corr->key = corr_key; + corr->correlation = _AI_correlation_coefficient ( corr_key.a, corr_key.b ); + HASH_ADD ( hh, correlation_table, key, sizeof ( AI_alert_correlation_key ), corr ); } } } + if ( HASH_COUNT ( correlation_table ) > 0 ) + { + avg_correlation = 0.0; + std_deviation = 0.0; + + /* Compute the average correlation coefficient */ + for ( corr = correlation_table; corr; corr = ( AI_alert_correlation* ) corr->hh.next ) + { + avg_correlation += corr->correlation; + } + + avg_correlation /= (double) HASH_COUNT ( correlation_table ); + + /* Compute the standard deviation */ + for ( corr = correlation_table; corr; corr = ( AI_alert_correlation* ) corr->hh.next ) + { + std_deviation += ( corr->correlation - avg_correlation ) * ( corr->correlation - avg_correlation ); + } + + std_deviation = sqrt ( std_deviation / (double) HASH_COUNT ( correlation_table )); + corr_threshold = avg_correlation + ( conf->correlationThresholdCoefficient * std_deviation ); + snprintf ( corr_dot_file, sizeof ( corr_dot_file ), "%s/correlated_alerts.dot", conf->corr_alerts_dir ); + + if ( stat ( conf->corr_alerts_dir, &st ) < 0 ) + { + if ( mkdir ( conf->corr_alerts_dir, 0755 ) < 0 ) + { + _dpd.fatalMsg ( "AIPreproc: Unable to create directory '%s'\n", conf->corr_alerts_dir ); + } + } + + if ( !( fp = fopen ( corr_dot_file, "w" ))) + _dpd.fatalMsg ( "AIPreproc: Could not write on file '%s'\n", corr_dot_file ); + fprintf ( fp, "digraph G {\n" ); + + /* Find correlated alerts */ + for ( corr = correlation_table; corr; corr = ( AI_alert_correlation* ) corr->hh.next ) + { + if ( corr->correlation >= avg_correlation + std_deviation && + avg_correlation + std_deviation != 0.0 && + corr->key.a->timestamp <= corr->key.b->timestamp && ! ( + corr->key.a->gid == corr->key.b->gid && + corr->key.a->sid == corr->key.b->sid && + corr->key.a->rev == corr->key.b->rev )) + { + if ( !( corr->key.a->derived_alerts = ( AI_snort_alert** ) realloc ( corr->key.a->derived_alerts, (++corr->key.a->n_derived_alerts) * sizeof ( AI_snort_alert* )))) + _dpd.fatalMsg ( "AIPreproc: Fatal memory allocation error at %s:%d\n", __FILE__, __LINE__ ); + + corr->key.a->derived_alerts[ corr->key.a->n_derived_alerts - 1 ] = corr->key.b; + corr->key.b->previous_correlated = corr->key.a; + _AI_print_correlated_alerts ( corr, fp ); + } + } + + fprintf ( fp, "}\n" ); + fclose ( fp ); + + #ifdef HAVE_LIBGVC + snprintf ( corr_png_file, sizeof ( corr_png_file ), "%s/correlated_alerts.png", conf->corr_alerts_dir ); + + if ( !( gvc = gvContext() )) + continue; + + if ( !( fp = fopen ( corr_dot_file, "r" ))) + continue; + + if ( !( g = agread ( fp ))) + continue; + + gvLayout ( gvc, g, "dot" ); + gvRenderFilename ( gvc, g, "png", corr_png_file ); + + gvFreeLayout ( gvc, g ); + agclose ( g ); + fclose ( fp ); + #endif + } + lock_flag = false; } diff --git a/db.c b/db.c index 1f84741..aa35de1 100644 --- a/db.c +++ b/db.c @@ -18,7 +18,7 @@ */ #include "spp_ai.h" -#ifdef ENABLE_DB +#ifdef HAVE_LIBMYSQLCLIENT #include "db.h" diff --git a/db.h b/db.h index ca2f0d6..8aafad5 100644 --- a/db.h +++ b/db.h @@ -17,23 +17,21 @@ * ===================================================================================== */ -#ifdef ENABLE_DB +#ifdef HAVE_LIBMYSQLCLIENT #ifndef _AI_DB_H #define _AI_DB_H - #ifdef ENABLE_MYSQL - #include + #include - typedef MYSQL_RES* DB_result; - typedef MYSQL_ROW DB_row; + typedef MYSQL_RES* DB_result; + typedef MYSQL_ROW DB_row; - #define DB_init mysql_do_init - #define DB_query mysql_do_query - #define DB_num_rows mysql_num_rows - #define DB_fetch_row mysql_fetch_row - #define DB_free_result mysql_free_result - #define DB_close mysql_do_close - #endif + #define DB_init mysql_do_init + #define DB_query mysql_do_query + #define DB_num_rows mysql_num_rows + #define DB_fetch_row mysql_fetch_row + #define DB_free_result mysql_free_result + #define DB_close mysql_do_close /** Initializer for the database */ void* DB_init ( AI_config* ); diff --git a/doc/html/alert__parser_8c.html b/doc/html/alert__parser_8c.html index a14b5c1..d41aadb 100644 --- a/doc/html/alert__parser_8c.html +++ b/doc/html/alert__parser_8c.html @@ -132,7 +132,7 @@ Variables -