From 5be6e2bbb89821121905441c5f359c1a7abe16ed Mon Sep 17 00:00:00 2001 From: BlackLight Date: Thu, 16 Sep 2010 11:14:52 +0200 Subject: [PATCH] Doxygen support without bugs now --- Makefile.am | 21 ++++++++++++++++++ Makefile.in | 21 ++++++++++++++++++ TODO | 4 +++- configure | 63 +++++++++++++++++++++++++--------------------------- configure.ac | 15 +++++-------- 5 files changed, 80 insertions(+), 44 deletions(-) diff --git a/Makefile.am b/Makefile.am index c052813..57958e7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,3 +37,24 @@ doc_DATA = doc/html/*.html doc/html/*.css doc/html/*.png sharedir = ${SHARE_PREFIX} share_DATA = README INSTALL AUTHORS COPYING NEWS TODO ChangeLog +install-docData: + if test ! -z "${DOC_PREFIX}"; then \ + cp -r ./doxygen "$(docdir)/doxygen"; \ + else \ + exit 0; \ + fi + +uninstall-docData: + if test ! -z "${DOC_PREFIX}"; then \ + rm -rf "$(docdir)"; \ + else \ + exit 0; \ + fi + +all: + if test ! -z "${DOC_PREFIX}"; then \ + if test ! -d "./doc"; then \ + doxygen; \ + fi; \ + fi + diff --git a/Makefile.in b/Makefile.in index fa4060d..377fc30 100644 --- a/Makefile.in +++ b/Makefile.in @@ -801,6 +801,27 @@ uninstall-am: uninstall-corr_rulesDATA uninstall-docDATA \ uninstall-libLTLIBRARIES uninstall-shareDATA +install-docData: + if test ! -z "${DOC_PREFIX}"; then \ + cp -r ./doxygen "$(docdir)/doxygen"; \ + else \ + exit 0; \ + fi + +uninstall-docData: + if test ! -z "${DOC_PREFIX}"; then \ + rm -rf "$(docdir)"; \ + else \ + exit 0; \ + fi + +all: + if test ! -z "${DOC_PREFIX}"; then \ + if test ! -d "./doc"; then \ + doxygen; \ + fi; \ + fi + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/TODO b/TODO index c588b21..8d4916d 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,9 @@ - Bayesian learning among alerts in alert log - libgc support - PostgreSQL support +- Dynamic k parameter in correlation threshold +- Dynamic cluster_min_size algorithm +- Regex comp cache - Managing clusters for addresses, timestamps (and more?) -- Dynamic cluster_min_size algorithm diff --git a/configure b/configure index 020e80f..963f2d0 100755 --- a/configure +++ b/configure @@ -2194,7 +2194,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi done @@ -2421,11 +2421,11 @@ am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -2835,7 +2835,7 @@ fi $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2868,7 +2868,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3316,7 +3316,7 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3431,7 +3431,7 @@ sed 's/^/| /' conftest.$ac_ext >&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 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3474,7 +3474,7 @@ 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 $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3533,7 +3533,7 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi @@ -3585,7 +3585,7 @@ sed 's/^/| /' conftest.$ac_ext >&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 $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -6670,7 +6670,7 @@ 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 $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -10763,21 +10763,14 @@ $as_echo "#define OSF1 1" >>confdefs.h ;; # it is actually -apple-darwin1.2 or -apple-rhapsody5.x but lets stick with this for the moment *-apple*) - # Use Fink. - if test -f "/sw/etc/fink.conf"; then - LDFLAGS="${LDFLAGS} -L/sw/lib" - extra_incl="-I/sw/include" - # Use MacPorts - else - LDFLAGS="${LDFLAGS} -L/opt/local/lib" - extra_incl="-I/opt/local/include" - fi $as_echo "#define MACOS 1" >>confdefs.h $as_echo "#define BROKEN_SIOCGIFMTU 1" >>confdefs.h + LDFLAGS="${LDFLAGS} -L/sw/lib" + extra_incl="-I/sw/include" esac # Checks for programs. @@ -11082,7 +11075,7 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -11559,7 +11552,7 @@ 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 $? "--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; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi @@ -11612,7 +11605,7 @@ 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; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi @@ -11664,7 +11657,7 @@ 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; } +See \`config.log' for more details" "$LINENO" 5 ; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 @@ -11714,7 +11707,7 @@ 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; } +See \`config.log' for more details" "$LINENO" 5 ; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 @@ -11764,7 +11757,7 @@ 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; } +See \`config.log' for more details" "$LINENO" 5 ; } fi @@ -11776,8 +11769,12 @@ else fi -DOC_PREFIX="${prefix}/doc/snort_ai_preprocessor" +# Set extra prefixes and control if we have Doxygen +if test ! -z "`which doxygen`"; then : + DOC_PREFIX="${prefix}/doc/snort_ai_preprocessor" + +fi SHARE_PREFIX="${prefix}/share/snort_ai_preprocessor" @@ -11790,7 +11787,7 @@ 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; } +See \`config.log' for more details" "$LINENO" 5 ; } fi if test "x$with_graphviz" != xno; then : @@ -11801,7 +11798,7 @@ 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; } +See \`config.log' for more details" "$LINENO" 5 ; } fi fi @@ -13780,7 +13777,7 @@ do "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -14096,7 +14093,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -14124,7 +14121,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -14151,7 +14148,7 @@ $as_echo "$as_me: creating $ac_file" >&6;} case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac diff --git a/configure.ac b/configure.ac index 33de7f2..8cd727d 100644 --- a/configure.ac +++ b/configure.ac @@ -87,17 +87,10 @@ case "$host" in ;; # it is actually -apple-darwin1.2 or -apple-rhapsody5.x but lets stick with this for the moment *-apple*) - # Use Fink. - if test -f "/sw/etc/fink.conf"; then - LDFLAGS="${LDFLAGS} -L/sw/lib" - extra_incl="-I/sw/include" - # Use MacPorts - else - LDFLAGS="${LDFLAGS} -L/opt/local/lib" - extra_incl="-I/opt/local/include" - fi AC_DEFINE([MACOS],[1],[Define if MacOS]) AC_DEFINE([BROKEN_SIOCGIFMTU],[1],[Define if broken SIOCGIFMTU]) + LDFLAGS="${LDFLAGS} -L/sw/lib" + extra_incl="-I/sw/include" esac # Checks for programs. @@ -135,7 +128,9 @@ AS_IF([test "x$prefix" == x/usr], [AC_SUBST([CORR_RULES_PREFIX], ["/etc/snort/corr_rules"])], [AC_SUBST([CORR_RULES_PREFIX], ["${prefix}/etc/corr_rules"])]) -AC_SUBST([DOC_PREFIX], ["${prefix}/doc/snort_ai_preprocessor"]) +# Set extra prefixes and control if we have Doxygen + +AS_IF([test ! -z "`which doxygen`"], [AC_SUBST([DOC_PREFIX], ["${prefix}/doc/snort_ai_preprocessor"])], []) AC_SUBST([SHARE_PREFIX], ["${prefix}/share/snort_ai_preprocessor"]) # Checks for header files.