tdf#84553 Detection of antivirus exclusion, EICAR test.

Change-Id: I3577a361edcc67f85f86ddb75778cd39784b39a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88269
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
diff --git a/configure.ac b/configure.ac
index 1bccce3..96e2cbc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12982,7 +12982,20 @@ if test $_os = WINNT ; then
    ANTIVIRUS_LIST=`cscript.exe //Nologo $SRC_ROOT/antivirusDetection.vbs`
    if [ [ "$ANTIVIRUS_LIST" != "NOT_FOUND" ] ]; then
        AC_MSG_RESULT([found])
        add_warning "To speed up builds and avoid failures in unit tests, it is highly recommended that you exclude the build directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST"
        EICAR_STRING='X5O!P%@AP@<:@4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
        echo $EICAR_STRING > $SRC_ROOT/eicar
        EICAR_TEMP_FILE_CONTENTS=`cat $SRC_ROOT/eicar`
        rm $SRC_ROOT/eicar
        if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
            AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
        fi
        echo $EICAR_STRING > $BUILDDIR/eicar
        EICAR_TEMP_FILE_CONTENTS=`cat $BUILDDIR/eicar`
        rm $BUILDDIR/eicar
        if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
            AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
        fi
        add_warning "To speed up builds and avoid failures in unit tests, it is highly recommended that you exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST"
    else
        AC_MSG_RESULT([not found])
    fi