<?xml version="1.0" encoding="UTF-8"?>
<project name="Zabbix backend" default="build" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless">
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<switch value="${DBTYPE}" caseinsensitive="true">
<case value="POSTGRESQL">
<property name="with.db" value="--with-postgresql"/>
<property name="with.postgresql" value="true"/>
<property name="with.db" value="--with-oracle"/>
<property name="with.oracle" value="true"/>
<property name="with.db" value="--with-mysql"/>
<property name="with.mysql" value="true"/>
<target name="init-conf-options">
<property name="conf1" value="--enable-agent"/>
<property name="conf2" value="--enable-server ${with.db}"/>
<property name="conf3" value="--enable-proxy ${with.db}"/>
<property name="conf4" value="--enable-server --enable-agent --enable-proxy ${with.db}"/>
<property name="conf6" value="--enable-server --enable-agent --enable-proxy ${with.db} --with-libxml2 --with-unixodbc --with-net-snmp --with-ssh2 --with-openipmi --with-libevent --with-openssl --with-ldap --with-libcurl"/>
<property name="conf7" value="--enable-server --enable-agent --enable-proxy ${with.db} --with-libxml2 --with-unixodbc --with-net-snmp --with-ssh2 --with-openipmi --with-libevent --with-gnutls --with-ldap --with-libcurl"/>
<target name="init-conf-options-2">
<property name="conf8" value="--enable-agent2"/>
<property name="conf9" value="--enable-server --enable-agent --enable-proxy ${with.db} --with-ssh"/>
<target name="cppcheck-static-analyzer">
<exec executable="./bootstrap.sh" failonerror="on"/>
<exec executable="scan-build" failonerror="on">
<arg line="./configure"/>
<arg line="--enable-server --enable-agent --enable-proxy --with-mysql --with-libxml2 --with-unixodbc --with-net-snmp --with-ssh2 --with-libevent --with-ldap --with-libcurl"/>
<exec executable="cppcheck" error="${SCANFILE}" failonerror="on">
<arg line="--enable=all"/>
<arg line="-I/usr/include"/>
<arg line="-I/usr/local/include"/>
<arg line="-I./include"/>
<arg line="-isrc/libs/zbxembed/duk_config.h"/>
<arg line="-isrc/libs/zbxembed/duktape.c"/>
<arg line="-isrc/libs/zbxembed/duktape.h"/>
<arg line="--suppress=variableScope:*"/>
<arg line="--suppress=ConfigurationNotChecked:*"/>
<arg line="--inconclusive"/>
<arg line="--xml-version=2"/>
<arg line="--cppcheck-build-dir=${CPPCHECK_BUILD_DIR}"/>
<target name="clang-static-analyzer" depends="init-conf-options">
<delete dir="clang-scan-build-reports"/>
<exec executable="./bootstrap.sh" failonerror="on"/>
<propertyselector property="conf.list" delimiter="," match="conf(\d+)"/>
<sortlist property="conf.list" delimiter="," value="${conf.list}" override="true"/>
<for list="${conf.list}" param="name" delimiter=",">
<exec executable="scan-build" failonerror="on">
<arg line="./configure"/>
<exec executable="scan-build" failonerror="on">
<arg line="-plist-html"/>
<arg line="./clang-scan-build-reports"/>