diff --git a/apache2/configure b/apache2/configure
index 34e7b006..b4375d77 100755
--- a/apache2/configure
+++ b/apache2/configure
@@ -739,6 +739,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_errors
enable_verbose_output
enable_strict_compile
enable_debug_conf
@@ -1383,6 +1384,7 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-errors Disable errors during configure.
--enable-verbose-output Enable more verbose configure output.
--enable-strict-compile Enable strict compilation (warnings are errors).
--enable-debug-conf Enable debug during configuration.
@@ -5029,6 +5031,23 @@ MSC_REGRESSION_DOCROOT_DIR="$MSC_REGRESSION_SERVERROOT_DIR/htdocs"
### Configure Options
+# Ignore configure errors
+# Check whether --enable-errors was given.
+if test "${enable_errors+set}" = set; then
+ enableval=$enable_errors;
+ if test "$enableval" != "no"; then
+ report_errors=1
+ else
+ report_errors=0
+ fi
+
+else
+
+ report_errors=1
+
+fi
+
+
# Verbose output
# Check whether --enable-verbose-output was given.
if test "${enable_verbose_output+set}" = set; then
@@ -5051,7 +5070,7 @@ fi
if test "${enable_strict_compile+set}" = set; then
enableval=$enable_strict_compile;
if test "$enableval" != "no"; then
- strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Werror"
+ strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Wformat -Wformat-security -Werror -fstack-protector -D_FORTIFY_SOURCE=2"
else
strict_compile=
fi
@@ -5228,9 +5247,16 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
{ $as_echo "$as_me:$LINENO: httpd is recent enough" >&5
$as_echo "$as_me: httpd is recent enough" >&6;}
else
- { { $as_echo "$as_me:$LINENO: error: apache is too old" >&5
+
+ if test "$report_errors" -eq 1; then
+ { { $as_echo "$as_me:$LINENO: error: apache is too old" >&5
$as_echo "$as_me: error: apache is too old" >&2;}
{ (exit mmn must be at least $HTTPD_WANTED_MMN); exit mmn must be at least $HTTPD_WANTED_MMN; }; }
+ else
+ { $as_echo "$as_me:$LINENO: apache is too old" >&5
+$as_echo "$as_me: apache is too old" >&mmn must be at least $HTTPD_WANTED_MMN;}
+ fi
+
fi
rm -f conftest*
@@ -5289,9 +5315,14 @@ $as_echo "$as_me: apxs LIBEXECDIR: $APXS_LIBEXECDIR" >&6;}; fi
if test "$verbose_output" -eq 1; then { $as_echo "$as_me:$LINENO: apxs HTTPD: $APXS_HTTPD" >&5
$as_echo "$as_me: apxs HTTPD: $APXS_HTTPD" >&6;}; fi
else
- { { $as_echo "$as_me:$LINENO: error: couldn't find APXS" >&5
+ if test "$report_errors" -eq 1; then
+ { { $as_echo "$as_me:$LINENO: error: couldn't find APXS" >&5
$as_echo "$as_me: error: couldn't find APXS" >&2;}
{ (exit 1); exit 1; }; }
+ else
+ { $as_echo "$as_me:$LINENO: couldn't find APXS" >&5
+$as_echo "$as_me: couldn't find APXS" >&6;}
+ fi
fi
# Include M4 macros
diff --git a/apache2/configure.in b/apache2/configure.in
index 37241fa7..90524681 100644
--- a/apache2/configure.in
+++ b/apache2/configure.in
@@ -63,6 +63,21 @@ AC_SUBST(MSC_REGRESSION_DOCROOT_DIR)
### Configure Options
+# Ignore configure errors
+AC_ARG_ENABLE(errors,
+ AS_HELP_STRING([--disable-errors],
+ [Disable errors during configure.]),
+[
+ if test "$enableval" != "no"; then
+ report_errors=1
+ else
+ report_errors=0
+ fi
+],
+[
+ report_errors=1
+])
+
# Verbose output
AC_ARG_ENABLE(verbose-output,
AS_HELP_STRING([--enable-verbose-output],
@@ -84,7 +99,7 @@ AC_ARG_ENABLE(strict-compile,
[Enable strict compilation (warnings are errors).]),
[
if test "$enableval" != "no"; then
- strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Werror"
+ strict_compile="-std=c99 -Wstrict-overflow=1 -Wextra -Wno-missing-field-initializers -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-unused-parameter -Wformat -Wformat-security -Werror -fstack-protector -D_FORTIFY_SOURCE=2"
else
strict_compile=
fi
@@ -231,7 +246,13 @@ if test -n "$APXS" -a "$APXS" != "no" -a -x "$APXS" ; then
VERSION_OK
#endif],
[AC_MSG_NOTICE(httpd is recent enough)],
- [AC_MSG_ERROR(apache is too old, mmn must be at least $HTTPD_WANTED_MMN)])
+ [
+ if test "$report_errors" -eq 1; then
+ AC_MSG_ERROR(apache is too old, mmn must be at least $HTTPD_WANTED_MMN)
+ else
+ AC_MSG_NOTICE(apache is too old, mmn must be at least $HTTPD_WANTED_MMN)
+ fi
+ ])
fi
APXS_INCLUDEDIR="`$APXS -q INCLUDEDIR`"
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apxs INCLUDEDIR: $APXS_INCLUDEDIR); fi
@@ -274,7 +295,11 @@ VERSION_OK
fi
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apxs HTTPD: $APXS_HTTPD); fi
else
- AC_MSG_ERROR(couldn't find APXS)
+ if test "$report_errors" -eq 1; then
+ AC_MSG_ERROR(couldn't find APXS)
+ else
+ AC_MSG_NOTICE(couldn't find APXS)
+ fi
fi
# Include M4 macros
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 00000000..43d82b8e
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,45 @@
+FOP = /opt/fop/fop.sh
+XALAN = /opt/fop/xalan.sh
+JAVA_HOME = /usr/lib/jvm/java-6-sun
+
+ALLDOCS = modsecurity2-apache-reference.pdf modsecurity2-data-formats.pdf modsecurity2-apache-reference.html modsecurity2-data-formats.html html-multipage/index.html index.html
+
+all: $(ALLDOCS)
+
+modsecurity2-apache-reference.pdf: modsecurity2-apache-reference.xml
+ JAVA_HOME=$(JAVA_HOME); export JAVA_HOME; \
+ $(FOP) -q -xsl pdf.xsl -xml modsecurity2-apache-reference.xml -pdf modsecurity2-apache-reference.pdf;
+
+modsecurity2-data-formats.pdf: modsecurity2-data-formats.xml
+ JAVA_HOME=$(JAVA_HOME); export JAVA_HOME; \
+ $(FOP) -q -xsl pdf.xsl -xml modsecurity2-data-formats.xml -pdf modsecurity2-data-formats.pdf;
+
+modsecurity2-apache-reference.html: modsecurity2-apache-reference.xml
+ JAVA_HOME=$(JAVA_HOME); export JAVA_HOME; \
+ $(XALAN) -q -xsl html.xsl -in modsecurity2-apache-reference.xml -param base.dir ./; \
+ mv index.html modsecurity2-apache-reference.html;
+
+modsecurity2-data-formats.html: modsecurity2-data-formats.xml
+ JAVA_HOME=$(JAVA_HOME); export JAVA_HOME; \
+ $(XALAN) -q -xsl html.xsl -in modsecurity2-data-formats.xml -param base.dir ./; \
+ mv index.html modsecurity2-data-formats.html;
+
+html-multipage/index.html: modsecurity2-apache-reference.xml
+ JAVA_HOME=$(JAVA_HOME); export JAVA_HOME; \
+ mkdir html-multipage/; \
+ $(XALAN) -q -xsl html-chunked.xsl -in modsecurity2-apache-reference.xml -param base.dir html-multipage/; \
+ cp modsecurity-reference.css html-multipage/; \
+ cp modsecurity.gif html-multipage/; \
+ cp breach-logo-small.gif html-multipage/; \
+ cp apache_request_cycle-modsecurity.jpg html-multipage/
+
+index.html: main-index.html
+ (cp main-index.html index.html && \
+ VERSION=`grep ".*" modsecurity2-apache-reference.xml | sed 's/[ \t]*<\/\?releaseinfo>[ \t]*//g'` && \
+ perl -pi -e "s/\\\$$version/$$VERSION/" index.html)
+
+clean:
+ rm -rf docindex.html $(ALLDOCS) html-multipage
+
+.PHONY: setup cleanup
+
diff --git a/doc/html-chunked.xsl b/doc/html-chunked.xsl
index 739ca0e1..2c42ecf1 100644
--- a/doc/html-chunked.xsl
+++ b/doc/html-chunked.xsl
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/doc/html.xsl b/doc/html.xsl
index b1cd6183..a3b50930 100644
--- a/doc/html.xsl
+++ b/doc/html.xsl
@@ -1,8 +1,8 @@
-
-
+
+
diff --git a/doc/index.html b/doc/main-index.html
similarity index 97%
rename from doc/index.html
rename to doc/main-index.html
index 85c74eed..321caa01 100644
--- a/doc/index.html
+++ b/doc/main-index.html
@@ -18,7 +18,7 @@ height="36" width="100" border="0">
ModSecurity for Apache Documentation
- Version $version
+ $version
- HTML, one page per chapter
diff --git a/doc/pdf.xsl b/doc/pdf.xsl
index b0ace8a3..b7b70c17 100644
--- a/doc/pdf.xsl
+++ b/doc/pdf.xsl
@@ -5,8 +5,8 @@
version="1.0"
>
-
-
+
+