summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am24
-rw-r--r--configure.in320
-rw-r--r--create/Makefile.am11
-rw-r--r--create/schema/Makefile.am10
-rwxr-xr-xcreate/schema/gen.pl29
-rw-r--r--create/schema/schema.sql22
-rwxr-xr-xdo2
-rw-r--r--include/common.h4
-rw-r--r--m4/ax_lib_mysql.m48
-rw-r--r--m4/ax_lib_postgresql.m48
-rw-r--r--m4/ax_lib_sqlite3.m46
-rw-r--r--m4/ldap.m483
-rw-r--r--m4/libcurl.m430
-rw-r--r--m4/netsnmp.m491
-rw-r--r--m4/sqlora8.m4105
-rw-r--r--m4/ucdsnmp.m491
-rw-r--r--misc/Makefile.am9
-rw-r--r--src/Makefile.am25
-rw-r--r--src/libs/Makefile.am20
-rw-r--r--src/libs/zbxcommon/Makefile.am2
-rw-r--r--src/libs/zbxdbhigh/db.c10
-rw-r--r--src/libs/zbxsysinfo/Makefile.am35
-rw-r--r--src/zabbix_agent/Makefile.am34
-rw-r--r--src/zabbix_server/Makefile.am32
-rw-r--r--src/zabbix_server/httppoller/Makefile.am2
-rw-r--r--src/zabbix_server/poller/Makefile.am2
26 files changed, 614 insertions, 401 deletions
diff --git a/Makefile.am b/Makefile.am
index 815b4151..62edf71f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,27 +2,23 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src
+SUBDIRS = \
+ src \
+ misc \
+ create
EXTRA_DIST = \
- aclocal.m4 \
- AUTHORS \
bin \
build \
- ChangeLog \
- configure \
- configure.in \
- COPYING \
- create \
FAQ \
frontends \
include \
- INSTALL \
- m4 \
- misc \
- NEWS \
- README \
test \
- TODO \
upgrades
+## "dist-hook" run after the distribution directory is filled, but before the actual tar (or shar) file is created.
+dist-hook:
+ rm -rf `find $(top_distdir) -name ".svn"`
+ rm -f $(top_distdir)/frontends/php/conf/zabbix.conf.php
+##TODO makdir $(top_distdir)/docs
+##TODO cp ?????/ZABBIX Manual v1.4.pdf $(top_distdir)/docs/
diff --git a/configure.in b/configure.in
index 5edae29b..f25cf503 100644
--- a/configure.in
+++ b/configure.in
@@ -20,7 +20,7 @@ dnl
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/zabbix_server/server.c)
-AM_INIT_AUTOMAKE([zabbix],[1.3.2])
+AM_INIT_AUTOMAKE([zabbix],[1.3.3])
AC_MSG_NOTICE([Configuring $PACKAGE_NAME $PACKAGE_VERSION])
@@ -476,14 +476,11 @@ AC_CHECK_FUNCS(atoll)
AC_CHECK_FUNCS(getopt_long)
dnl Check if we want to compile everything with static
- AC_ARG_ENABLE(static,[
- --enable-static Build statically linked binaries],
- CFLAGS="-static $CFLAGS";
- enable_static=yes)
-dnl LIBS="")
-
-AC_ARG_ENABLE(server,
-[ --enable-server Turn on build of server],
+AC_ARG_ENABLE(static,[ --enable-static Build statically linked binaries],
+[ CFLAGS="-static $CFLAGS";
+ enable_static=yes])
+
+AC_ARG_ENABLE(server,[ --enable-server Turn on build of server],
[case "${enableval}" in
yes) server=yes ;;
no) server=no ;;
@@ -492,8 +489,7 @@ esac],
[server=no])
AM_CONDITIONAL(SERVER, test x$server = xyes)
-AC_ARG_ENABLE(agent,
-[ --enable-agent Turn on build of agent],
+AC_ARG_ENABLE(agent,[ --enable-agent Turn on build of agent],
[case "${enableval}" in
yes) agent=yes ;;
no) agent=no ;;
@@ -502,66 +498,31 @@ esac],
[agent=no])
AM_CONDITIONAL(AGENT, test x$agent = xyes)
-
-
have_db="no"
if test "$server" = "yes"; then
- AC_ARG_WITH(oracle,
- [
-What DBMS do you want to use (please select only one):
-AC_HELP_STRING([--with-oracle@<:@=ARG@:>@],
- [use Sqlora8 library @<:@default=no@:>@, default is to search through a number of common places for the Sqlora8 files.])],
- [
- if test "$withval" != "no"; then
- AC_MSG_CHECKING(for Oracle support)
- if test "$have_db" != "no"; then
- AC_MSG_RESULT(error)
+ dnl Checking for Oracle support
+ LIBSQLORA8_CHECK_CONFIG()
+ if test "x$want_sqlora8" = "xyes"; then
+ if test "x$have_db" != "xno"; then
AC_MSG_ERROR([You can configure for only one database.]);
fi
- if test "$withval" = "yes"; then
- if test -f /usr/include/sqlora.h; then
- ORACLE_INCDIR=/usr/include
- ORACLE_LIBDIR=/usr/lib
- elif test -f /usr/lib/libsqlora8/include/sqlora.h; then
- ORACLE_INCDIR=/usr/lib/libsqlora8/include
- ORACLE_LIBDIR=/usr/lib
- elif test -f $ORACLE_HOME/lib/sqlora8/include/sqlora.h; then
- ORACLE_INCDIR=$ORACLE_HOME/lib/sqlora8/include
- ORACLE_LIBDIR=$ORACLE_HOME/lib
- elif test -f $ORACLE_HOME/include/sqlora.h; then
- ORACLE_INCDIR=${ORACLE_HOME}/include
- ORACLE_LIBDIR=${ORACLE_HOME}/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid Oracle directory - unable to find sqlora.h])
- fi
+
+ if test "x$found_sqlora8" = "xyes"; then
+ have_db="Oracle"
+
+ ORACLE_CPPFLAGS = $SQLORA8_CPPFLAGS
+ ORACLE_LDFLAGS = $SQLORA8_LDFLAGS
+
+ AC_SUBST(ORACLE_CPPFLAGS)
+ AC_SUBST(ORACLE_LDFLAGS)
+
+ AC_DEFINE(HAVE_ORACLE,1,[Define to 1 if Oracle should be enabled.])
else
- if test -f $withval/include/sqlora.h; then
- ORACLE_INCDIR=$withval/include
- ORACLE_LIBDIR=$withval/lib
- elif test -f $withval/lib/libsqlora8/include/sqlora.h; then
- ORACLE_INCDIR=$withval/lib/libsqlora8/include
- ORACLE_LIBDIR=$withval/lib
- elif test -f $withval/libsqlora8/include/sqlora.h; then
- ORACLE_INCDIR=$withval/libsqlora8/include
- ORACLE_LIBDIR=$withval
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid Oracle directory - unable to find sqlora.h under $withval])
- fi
+ AC_MSG_ERROR([Not found Sqlora8 library]);
fi
- ORACLE_CFLAGS="-I$ORACLE_INCDIR"
- ORACLE_LDFLAGS="-L$ORACLE_LIBDIR -lsqlora8"
-
- AC_DEFINE(HAVE_ORACLE,1,[Define to 1 if Oracle should be enabled.])
- AC_MSG_RESULT(yes)
- have_db="Oracle"
fi
- ],[])
- AC_SUBST(ORACLE_CFLAGS)
- AC_SUBST(ORACLE_LDFLAGS)
dnl Checking for SQLite3 support
AX_LIB_SQLITE3()
@@ -624,204 +585,44 @@ AC_HELP_STRING([--with-oracle@<:@=ARG@:>@],
AC_MSG_RESULT(ok)
fi
- DB_CPPFLAGS="$ORACLE_CFLAGS $SQLITE_CFLAGS $MYSQL_CFLAGS $POSTGRESQL_CFLAGS"
- DB_LDFLAGS="$ORACLE_LDFLAGS $SQLITE_LDFLAGS $MYSQL_LDFLAGS $POSTGRESQL_LDFLAGS"
+ DB_CPPFLAGS="$ORACLE_CPPFLAGS $SQLITE3_CPPFLAGS $MYSQL_CPPFLAGS $POSTGRESQL_CPPFLAGS"
+ DB_LDFLAGS="$ORACLE_LDFLAGS $SQLITE3_LDFLAGS $MYSQL_LDFLAGS $POSTGRESQL_LDFLAGS"
AC_SUBST(DB_CPPFLAGS)
AC_SUBST(DB_LDFLAGS)
fi
-AC_MSG_CHECKING(for NET-SNMP support)
-AC_ARG_WITH(net-snmp,
-[
-What SNMP package do you want to use (please select only one):
-AC_HELP_STRING([--with-net-snmp@<:@=ARG@:>@],
- [use NET-SNMP package @<:@default=no@:>@, default is to search through a number of common places for the NET-SNMP files.])],
-[
- if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
- if test -f /usr/local/net-snmp/include/net-snmp-includes.h; then
- SNMP_INCDIR=/usr/local/net-snmp/include/
- SNMP_LIBDIR=/usr/local/net-snmp/lib/
- elif test -f /usr/include/net-snmp/net-snmp-includes.h; then
-dnl SNMP_INCDIR=/usr/include/net-snmp
-dnl SNMP_LIBDIR=/usr/lib/net-snmp
- SNMP_INCDIR=/usr/include
- SNMP_LIBDIR=/usr/lib
- elif test -f /usr/include/net-snmp-includes.h; then
- SNMP_INCDIR=/usr/include
- SNMP_LIBDIR=/usr/lib
- elif test -f /usr/local/include/net-snmp/net-snmp-includes.h; then
-dnl SNMP_INCDIR=/usr/local/include/net-snmp
-dnl SNMP_LIBDIR=/usr/local/lib/net-snmp
- SNMP_INCDIR=/usr/local/include
- SNMP_LIBDIR=/usr/local/lib
- elif test -f /usr/local/include/net-snmp-includes.h; then
- SNMP_INCDIR=/usr/local/include
- SNMP_LIBDIR=/usr/local/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid NET-SNMP directory - unable to find net-snmp-includes.h])
- fi
- else
- if test -f $withval/include/net-snmp/net-snmp-includes.h; then
-dnl SNMP_INCDIR=$withval/include/net-snmp
-dnl SNMP_LIBDIR=$withval/lib/net-snmp
- SNMP_INCDIR=$withval/include
- SNMP_LIBDIR=$withval/lib
- elif test -f $withval/include/net-snmp-includes.h; then
- SNMP_INCDIR=$withval/include
- SNMP_LIBDIR=$withval/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid NET-SNMP directory - unable to find net-snmp-includes.h under $withval])
- fi
- fi
-
-dnl AC_CHECK_LIB(crypto, main, SNMP_LFLAGS="-lcrypto $SNMP_LFLAGS")
- AC_CHECK_LIB(crypto, main, SNMP_LIBS="$SNMP_LIBS -lcrypto")
-
- SNMP_INCLUDE=-I$SNMP_INCDIR
- SNMP_LFLAGS="-L$SNMP_LIBDIR $SNMP_LFLAGS"
- SNMP_LIBS="-lnetsnmp $SNMP_LIBS"
-
- AC_DEFINE(HAVE_NETSNMP,1,[Define to 1 if NET-SNMP should be enabled.])
- AC_DEFINE(HAVE_SNMP,1,[Define to 1 if SNMP should be enabled.])
- AC_MSG_RESULT(yes)
-
- else
- AC_MSG_RESULT(no)
- fi
-],[
- AC_MSG_RESULT(no)
-])
-AC_SUBST(SNMP_INCLUDE)
-AC_SUBST(SNMP_LFLAGS)
-AC_SUBST(SNMP_LIBS)
-
-AC_MSG_CHECKING(for UCD-SNMP support)
-AC_ARG_WITH(ucd-snmp,
-[AC_HELP_STRING([--with-ucd-snmp@<:@=ARG@:>@],
- [use UCD-SNMP package @<:@default=no@:>@, default is to search through a number of common places for the UCD-SNMP files.])],
-[
- if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
- if test -f /usr/local/ucd-snmp/include/ucd-snmp-config.h; then
- SNMP_INCDIR=/usr/local/ucd-snmp/include/
- SNMP_LIBDIR=/usr/local/ucd-snmp/lib/
- elif test -f /usr/include/ucd-snmp/ucd-snmp-config.h; then
-dnl SNMP_INCDIR=/usr/include/ucd-snmp
-dnl SNMP_LIBDIR=/usr/lib/ucd-snmp
- SNMP_INCDIR=/usr/include
- SNMP_LIBDIR=/usr/lib
- elif test -f /usr/include/ucd-snmp-config.h; then
- SNMP_INCDIR=/usr/include
- SNMP_LIBDIR=/usr/lib
- elif test -f /usr/local/include/ucd-snmp/ucd-snmp-config.h; then
-dnl SNMP_INCDIR=/usr/local/include/ucd-snmp
-dnl SNMP_LIBDIR=/usr/local/lib/ucd-snmp
- SNMP_INCDIR=/usr/local/include
- SNMP_LIBDIR=/usr/local/lib
- elif test -f /usr/local/include/ucd-snmp-config.h; then
- SNMP_INCDIR=/usr/local/include
- SNMP_LIBDIR=/usr/local/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid UCD-SNMP directory - unable to find ucd-snmp-config.h])
- fi
- else
- if test -f $withval/include/ucd-snmp/ucd-snmp-config.h; then
-dnl SNMP_INCDIR=$withval/include/ucd-snmp
-dnl SNMP_LIBDIR=$withval/lib/ucd-snmp
- SNMP_INCDIR=$withval/include
- SNMP_LIBDIR=$withval/lib
- elif test -f $withval/include/ucd-snmp-config.h; then
- SNMP_INCDIR=$withval/include
- SNMP_LIBDIR=$withval/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid UCD-SNMP directory - unable to find ucd-snmp-config.h under $withval])
- fi
- fi
-dnl AC_CHECK_LIB(crypto, main, SNMP_LFLAGS="-lcrypto $SNMP_LFLAGS")
- AC_CHECK_LIB(crypto, main, SNMP_LIBS="$SNMP_LIBS -lcrypto")
-
- SNMP_INCLUDE=-I$SNMP_INCDIR
- SNMP_LFLAGS="-L$SNMP_LIBDIR $SNMP_LFLAGS"
- SNMP_LIBS="-lsnmp $SNMP_LIBS"
+dnl Check for NET-SNMP [by default - skip]
+LIBNETSNMP_CHECK_CONFIG([no])
+if test "x$want_netsnmp" = "xyes"; then
+ if test "x$found_netsnmp" != "xyes"; then
+ AC_MSG_ERROR([Invalid NET-SNMP directory - unable to find net-snmp-config.h])
+ fi
+fi
- AC_DEFINE(HAVE_UCDSNMP,1,[Define to 1 if UCDSNMP should be enabled.])
- AC_DEFINE(HAVE_SNMP,1,[Define to 1 if SNMP should be enabled.])
- AC_MSG_RESULT(yes)
+dnl Check for UCD-SNMP [by default - skip]
+LIBSNMP_CHECK_CONFIG([no])
+if test "x$want_snmp" = "xyes"; then
+ if test "x$found_snmp" != "xyes"; then
+ AC_MSG_ERROR([Invalid UCD-SNMP directory - unable to find ucd-snmp-config.h])
+ fi
- else
- AC_MSG_RESULT(no)
- fi
-],[
- AC_MSG_RESULT(no)
-])
-AC_SUBST(SNMP_LFLAGS)
-AC_SUBST(SNMP_INCLUDE)
+ if test "x$found_netsnmp" = "xyes"; then
+ AC_MSG_ERROR([You can configure for only one SNMP library.]);
+ fi
+fi
+dnl Check for libLDAP [by default - skip]
+LIBLDAP_CHECK_CONFIG([no])
+if test "x$want_ldap" = "xyes"; then
+ if test "x$found_ldap" != "xyes"; then
+ AC_MSG_ERROR([Invalid LDAP directory - unable to find ldap.h])
+ fi
+fi
+dnl Check for libCurl [default - yes]
LIBCURL_CHECK_CONFIG([yes], [7.15.1], [],[])
-
-AC_MSG_CHECKING(for LDAP support)
-AC_ARG_WITH(ldap,
-[
-If you want to check LDAP servers:
-AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],
- [Include LDAP support @<:@default=no@:>@. DIR is the LDAP base install directory, default is to search through a number of common places for the LDAP files.])],
-[
- if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
- if test -f /usr/local/openldap/include/ldap.h; then
- LDAP_INCDIR=/usr/local/openldap/include/
- LDAP_LIBDIR=/usr/local/openldap/lib/
- elif test -f /usr/include/ldap.h; then
- LDAP_INCDIR=/usr/include
- LDAP_LIBDIR=/usr/lib
- elif test -f /usr/local/include/ldap.h; then
- LDAP_INCDIR=/usr/local/include
- LDAP_LIBDIR=/usr/local/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid LDAP directory - unable to find ldap.h])
- fi
- else
- if test -f $withval/include/ldap.h; then
- LDAP_INCDIR=$withval/include
- LDAP_LIBDIR=$withval/lib
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Invalid LDAP directory - unable to find ldap.h under $withval])
- fi
- fi
-
- LDAP_INCLUDE=-I$LDAP_INCDIR
- LDAP_LFLAGS="-L$LDAP_LIBDIR $LDAP_LFLAGS"
- LDAP_LIBS="-lldap"
-
- if test x$enable_static = xyes; then
- LDAP_LIBS=" -llber -lgnutls -lpthread -lsasl2 $LDAP_LIBS"
- fi
-
- AC_DEFINE(HAVE_LDAP,1,[Define to 1 if LDAP should be enabled.])
- AC_MSG_RESULT(yes)
-
- else
- AC_MSG_RESULT(no)
- fi
-],[
- AC_MSG_RESULT(no)
-])
-AC_SUBST(LDAP_INCLUDE)
-AC_SUBST(LDAP_LFLAGS)
-AC_SUBST(LDAP_LIBS)
-
-#AC_SUBST(SUBDIRS)
-
RANLIB="ranlib"
AC_SUBST(RANLIB)
@@ -901,24 +702,6 @@ dnl AC_MSG_ERROR(${host_os} not supported)
esac
AC_DEFINE_UNQUOTED([ARCH], "${ARCH}", [Define to os name for code managing])
-dnl AM_CONDITIONAL(CONFIG_HOST_LINUX, test "x$ARCH" = "xlinux")
-dnl AC_SUBST(CONFIG_HOST_LINUX)
-
-dnl AM_CONDITIONAL(CONFIG_HOST_SOLARIS, test "x$ARCH" = "xsolaris")
-dnl AC_SUBST(CONFIG_HOST_SOLARIS)
-
-dnl AM_CONDITIONAL(CONFIG_HOST_HPUX, test "x$ARCH" = "xhpux")
-dnl AC_SUBST(CONFIG_HOST_HPUX)
-
-dnl AM_CONDITIONAL(CONFIG_HOST_FREEBSD, test "x$ARCH" = "xfreebsd")
-dnl AC_SUBST(CONFIG_HOST_FREEBSD)
-
-dnl AM_CONDITIONAL(CONFIG_HOST_OPENBSD, test "x$ARCH" = "xopenbsd")
-dnl AC_SUBST(CONFIG_HOST_OPENBSD)
-
-dnl AM_CONDITIONAL(CONFIG_HOST_UNKNOWN, test "x$ARCH" = "xunknown")
-dnl AC_SUBST(CONFIG_HOST_UNKNOWN)
-
AC_SUBST(ARCH)
AC_OUTPUT([Makefile src/Makefile src/libs/Makefile src/libs/zbxlog/Makefile src/libs/zbxcrypto/Makefile
@@ -932,7 +715,8 @@ AC_OUTPUT([Makefile src/Makefile src/libs/Makefile src/libs/zbxlog/Makefile src/
src/libs/zbxsysinfo/aix/Makefile src/libs/zbxsysinfo/freebsd/Makefile src/libs/zbxsysinfo/hpux/Makefile
src/libs/zbxsysinfo/openbsd/Makefile src/libs/zbxsysinfo/osx/Makefile src/libs/zbxsysinfo/solaris/Makefile
src/libs/zbxsysinfo/osf/Makefile src/libs/zbxsysinfo/netbsd/Makefile src/libs/zbxsysinfo/unknown/Makefile
- src/libs/zbxnix/Makefile src/libs/zbxplugin/Makefile src/libs/zbxsys/Makefile src/libs/zbxcomms/Makefile])
+ src/libs/zbxnix/Makefile src/libs/zbxplugin/Makefile src/libs/zbxsys/Makefile src/libs/zbxcomms/Makefile
+ misc/Makefile create/Makefile create/schema/Makefile])
echo "
diff --git a/create/Makefile.am b/create/Makefile.am
new file mode 100644
index 00000000..127d3925
--- /dev/null
+++ b/create/Makefile.am
@@ -0,0 +1,11 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = schema
+
+EXTRA_DIST = \
+ data/data.sql \
+ data/images_oracle.sql \
+ data/images_pgsql.sql \
+ data/images.sql \
+ data/images_sqlite3.sql
+
diff --git a/create/schema/Makefile.am b/create/schema/Makefile.am
new file mode 100644
index 00000000..122964f2
--- /dev/null
+++ b/create/schema/Makefile.am
@@ -0,0 +1,10 @@
+## Process this file with automake to produce Makefile.in
+
+## "dist-hook" run after the distribution directory is filled, but before the actual tar (or shar) file is created.
+dist-hook:
+ $(srcdir)/gen.pl mysql > $(distdir)/mysql.sql
+ $(srcdir)/gen.pl postgresql > $(distdir)/postgresql.sql
+ $(srcdir)/gen.pl sqlite3 > $(distdir)/sqlite3.sql
+ $(srcdir)/gen.pl oracle > $(distdir)/oracle.sql
+ $(srcdir)/gen.pl c > $(top_distdir)/include/dbsync.h
+
diff --git a/create/schema/gen.pl b/create/schema/gen.pl
index 04cf83f9..6200fadc 100755
--- a/create/schema/gen.pl
+++ b/create/schema/gen.pl
@@ -40,8 +40,7 @@ local $output;
"t_image" => "longblob",
"t_history_log" => "text",
"t_history_text"=> "text",
-# "t_text" => "blob"
- "t_text" => "text"
+ "t_blob" => "blob"
);
%c=( "type" => "code",
@@ -57,7 +56,7 @@ local $output;
"t_image" => "ZBX_TYPE_BLOB",
"t_history_log" => "ZBX_TYPE_TEXT",
"t_history_text"=> "ZBX_TYPE_TEXT",
- "t_text" => "ZBX_TYPE_BLOB"
+ "t_blob" => "ZBX_TYPE_BLOB"
);
$c{"before"}="
@@ -81,20 +80,20 @@ ZBX_TABLE
static ZBX_TABLE tables[]={
";
-%oracle=("t_bigint" => "number(21)",
+%oracle=("t_bigint" => "bigint",
"before" => "",
"after" => "",
"type" => "sql",
- "t_id" => "number(21)",
- "t_integer" => "number(10)",
+ "t_id" => "bigint",
+ "t_integer" => "integer",
"t_serial" => "serial",
- "t_double" => "number(20,4)",
- "t_varchar" => "varchar2",
- "t_char" => "varchar2",
- "t_image" => "blob",
- "t_history_log" => "varchar2(4000)",
- "t_history_text"=> "CLOB",
- "t_text" => "varchar2(4000)"
+ "t_double" => "double",
+ "t_varchar" => "varchar",
+ "t_char" => "char",
+ "t_image" => "longblob",
+ "t_history_log" => "text",
+ "t_history_text"=> "text",
+ "t_blob" => "blob"
);
%postgresql=("t_bigint" => "bigint",
@@ -111,7 +110,7 @@ static ZBX_TABLE tables[]={
"t_history_log" => "varchar(255)",
"t_history_text"=> "text",
"t_time" => "integer",
- "t_text" => "text"
+ "t_blob" => "text"
);
%sqlite=("t_bigint" => "bigint",
@@ -127,7 +126,7 @@ static ZBX_TABLE tables[]={
"t_image" => "longblob",
"t_history_log" => "text",
"t_history_text"=> "text",
- "t_text" => "blob"
+ "t_blob" => "blob"
);
sub newstate
diff --git a/create/schema/schema.sql b/create/schema/schema.sql
index bca11423..b2923e75 100644
--- a/create/schema/schema.sql
+++ b/create/schema/schema.sql
@@ -32,7 +32,7 @@ FIELD |curstep |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |lastfailedstep |t_id |'0' |NOT NULL |ZBX_SYNC
FIELD |delay |t_integer |'60' |NOT NULL |ZBX_SYNC
FIELD |status |t_integer |'0' |NOT NULL |ZBX_SYNC
-FIELD |macros |t_text |'' |NOT NULL |ZBX_SYNC
+FIELD |macros |t_blob |'' |NOT NULL |ZBX_SYNC
FIELD |agent |t_varchar(255) |'' |NOT NULL |ZBX_SYNC
FIELD |time |t_double(16,4) |'0' |NOT NULL |ZBX_SYNC
FIELD |error |t_varchar(255) |'' |NOT NULL |ZBX_SYNC
@@ -45,7 +45,7 @@ FIELD |name |t_varchar(64) |'' |NOT NULL |ZBX_SYNC
FIELD |no |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |url |t_varchar(128) |'' |NOT NULL |ZBX_SYNC
FIELD |timeout |t_integer |'30' |NOT NULL |ZBX_SYNC
-FIELD |posts |t_text |'' |NOT NULL |ZBX_SYNC
+FIELD |posts |t_blob |'' |NOT NULL |ZBX_SYNC
FIELD |required |t_varchar(255) |'' |NOT NULL |ZBX_SYNC
INDEX |httpstep_1 |httptestid
@@ -147,7 +147,7 @@ FIELD |clock |t_time |'0' |NOT NULL |ZBX_SYNC
FIELD |mediatypeid |t_id |'0' |NOT NULL |ZBX_SYNC
FIELD |sendto |t_varchar(100) |'' |NOT NULL |ZBX_SYNC
FIELD |subject |t_varchar(255) |'' |NOT NULL |ZBX_SYNC
-FIELD |message |t_text |'' |NOT NULL |ZBX_SYNC
+FIELD |message |t_blob |'' |NOT NULL |ZBX_SYNC
FIELD |status |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |retries |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |error |t_varchar(128) |'' |NOT NULL |ZBX_SYNC
@@ -230,14 +230,14 @@ TABLE|actions|actionid|ZBX_SYNC
FIELD |actionid |t_id |'0' |NOT NULL |ZBX_SYNC
FIELD |userid |t_id |'0' |NOT NULL |ZBX_SYNC
FIELD |subject |t_varchar(255) |'' |NOT NULL |ZBX_SYNC
-FIELD |message |t_text |'' |NOT NULL |ZBX_SYNC
+FIELD |message |t_blob |'' |NOT NULL |ZBX_SYNC
FIELD |recipient |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |maxrepeats |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |repeatdelay |t_integer |'600' |NOT NULL |ZBX_SYNC
FIELD |source |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |actiontype |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |status |t_integer |'0' |NOT NULL |ZBX_SYNC
-FIELD |scripts |t_text |'' |NOT NULL |ZBX_SYNC
+FIELD |scripts |t_blob |'' |NOT NULL |ZBX_SYNC
TABLE|applications|applicationid|ZBX_SYNC
FIELD |applicationid |t_id |'0' |NOT NULL |ZBX_SYNC
@@ -353,11 +353,11 @@ FIELD |os |t_varchar(64) |'' |NOT NULL |ZBX_SYNC
FIELD |serialno |t_varchar(64) |'' |NOT NULL |ZBX_SYNC
FIELD |tag |t_varchar(64) |'' |NOT NULL |ZBX_SYNC
FIELD |macaddress |t_varchar(64) |'' |NOT NULL |ZBX_SYNC
-FIELD |hardware |t_text |'' |NOT NULL |ZBX_SYNC
-FIELD |software |t_text |'' |NOT NULL |ZBX_SYNC
-FIELD |contact |t_text |'' |NOT NULL |ZBX_SYNC
-FIELD |location |t_text |'' |NOT NULL |ZBX_SYNC
-FIELD |notes |t_text |'' |NOT NULL |ZBX_SYNC
+FIELD |hardware |t_blob |'' |NOT NULL |ZBX_SYNC
+FIELD |software |t_blob |'' |NOT NULL |ZBX_SYNC
+FIELD |contact |t_blob |'' |NOT NULL |ZBX_SYNC
+FIELD |location |t_blob |'' |NOT NULL |ZBX_SYNC
+FIELD |notes |t_blob |'' |NOT NULL |ZBX_SYNC
TABLE|hosts_templates|hosttemplateid|ZBX_SYNC
FIELD |hosttemplateid |t_id |'0' |NOT NULL |ZBX_SYNC
@@ -569,7 +569,7 @@ FIELD |value |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |priority |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |lastchange |t_integer |'0' |NOT NULL |ZBX_SYNC
FIELD |dep_level |t_integer |'0' |NOT NULL |ZBX_SYNC
-FIELD |comments |t_text | | |ZBX_SYNC
+FIELD |comments |t_blob | | |ZBX_SYNC
FIELD |error |t_varchar(128) |'' |NOT NULL |ZBX_SYNC
FIELD |templateid |t_id |'0' |NOT NULL |ZBX_SYNC
INDEX |1 |status
diff --git a/do b/do
index eb8170c2..bf9a4954 100755
--- a/do
+++ b/do
@@ -108,7 +108,7 @@ then
autoconf 2>> WARNINGS
autoheader 2>> WARNINGS
automake -a 2>> WARNINGS
- automake 2>> WARNINGS
+# automake 2>> WARNINGS
fi
if [ "$copy" = "yes" ]
diff --git a/include/common.h b/include/common.h
index 041d3a21..750f0fd7 100644
--- a/include/common.h
+++ b/include/common.h
@@ -60,8 +60,8 @@
#define OFF 0
#define APPLICATION_NAME "ZABBIX Agent"
-#define ZABBIX_REVDATE "11 December 2006"
-#define ZABBIX_VERSION "1.3.2"
+#define ZABBIX_REVDATE "XX ???????? 2007"
+#define ZABBIX_VERSION "1.3.3"
#if defined(_WINDOWS)
/*# pragma warning (disable: 4100)*/
diff --git a/m4/ax_lib_mysql.m4 b/m4/ax_lib_mysql.m4
index d3b90ccf..af22f9ff 100644
--- a/m4/ax_lib_mysql.m4
+++ b/m4/ax_lib_mysql.m4
@@ -25,7 +25,7 @@
#
# This macro calls:
#
-# AC_SUBST(MYSQL_CFLAGS)
+# AC_SUBST(MYSQL_CPPFLAGS)
# AC_SUBST(MYSQL_LDFLAGS)
# AC_SUBST(MYSQL_VERSION)
#
@@ -64,7 +64,7 @@ AC_DEFUN([AX_LIB_MYSQL],
[want_mysql="no"]
)
- MYSQL_CFLAGS=""
+ MYSQL_CPPFLAGS=""
MYSQL_LDFLAGS=""
MYSQL_VERSION=""
@@ -81,7 +81,7 @@ AC_DEFUN([AX_LIB_MYSQL],
if test "$MYSQL_CONFIG" != "no"; then
AC_MSG_CHECKING([for MySQL libraries])
- MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
+ MYSQL_CPPFLAGS="`$MYSQL_CONFIG --cflags`"
MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
MYSQL_VERSION=`$MYSQL_CONFIG --version`
@@ -143,6 +143,6 @@ AC_DEFUN([AX_LIB_MYSQL],
fi
AC_SUBST([MYSQL_VERSION])
- AC_SUBST([MYSQL_CFLAGS])
+ AC_SUBST([MYSQL_CPPFLAGS])
AC_SUBST([MYSQL_LDFLAGS])
])
diff --git a/m4/ax_lib_postgresql.m4 b/m4/ax_lib_postgresql.m4
index c97f5e12..f47d3725 100644
--- a/m4/ax_lib_postgresql.m4
+++ b/m4/ax_lib_postgresql.m4
@@ -25,7 +25,7 @@
#
# This macro calls:
#
-# AC_SUBST(POSTGRESQL_CFLAGS)
+# AC_SUBST(POSTGRESQL_CPPFLAGS)
# AC_SUBST(POSTGRESQL_LDFLAGS)
# AC_SUBST(POSTGRESQL_VERSION)
#
@@ -64,7 +64,7 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
[want_postgresql="no"]
)
- POSTGRESQL_CFLAGS=""
+ POSTGRESQL_CPPFLAGS=""
POSTGRESQL_LDFLAGS=""
POSTGRESQL_POSTGRESQL=""
@@ -81,7 +81,7 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
if test "$PG_CONFIG" != "no"; then
AC_MSG_CHECKING([for PostgreSQL libraries])
- POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
+ POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`"
POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq"
POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
@@ -143,6 +143,6 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
fi
AC_SUBST([POSTGRESQL_VERSION])
- AC_SUBST([POSTGRESQL_CFLAGS])
+ AC_SUBST([POSTGRESQL_CPPFLAGS])
AC_SUBST([POSTGRESQL_LDFLAGS])
])
diff --git a/m4/ax_lib_sqlite3.m4 b/m4/ax_lib_sqlite3.m4
index 2ead5893..1d70ca85 100644
--- a/m4/ax_lib_sqlite3.m4
+++ b/m4/ax_lib_sqlite3.m4
@@ -17,7 +17,7 @@
#
# This macro calls:
#
-# AC_SUBST(SQLITE3_CFLAGS)
+# AC_SUBST(SQLITE3_CPPFLAGS)
# AC_SUBST(SQLITE3_LDFLAGS)
# AC_SUBST(SQLITE3_VERSION)
#
@@ -129,7 +129,7 @@ dnl AC_LANG_POP([C++])
if test "$found_sqlite3" = "yes"; then
- SQLITE3_CFLAGS="$ac_sqlite3_cppflags"
+ SQLITE3_CPPFLAGS="$ac_sqlite3_cppflags"
SQLITE3_LDFLAGS="$ac_sqlite3_ldflags"
ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header"
@@ -146,7 +146,7 @@ dnl AC_LANG_POP([C++])
fi
fi
- AC_SUBST(SQLITE3_CFLAGS)
+ AC_SUBST(SQLITE3_CPPFLAGS)
AC_SUBST(SQLITE3_LDFLAGS)
AC_SUBST(SQLITE3_VERSION)
AC_DEFINE(HAVE_SQLITE3, [1], [Define to 1 if SQLite libraries are available])
diff --git a/m4/ldap.m4 b/m4/ldap.m4
new file mode 100644
index 00000000..86afddf1
--- /dev/null
+++ b/m4/ldap.m4
@@ -0,0 +1,83 @@
+# LIBLDAP_CHECK_CONFIG ([DEFAULT-ACTION])
+# ----------------------------------------------------------
+# Eugene Grigorjev <eugene@zabbix.com> Feb-02-2007
+#
+# Checks for ldap. DEFAULT-ACTION is the string yes or no to
+# specify whether to default to --with-ldap or --without-ldap.
+# If not supplied, DEFAULT-ACTION is no.
+#
+# This macro #defines HAVE_LDAP if a required header files is
+# found, and sets @LDAP_LDFLAGS@ and @LDAP_CPPFLAGS@ to the necessary
+# values.
+#
+# Users may override the detected values by doing something like:
+# LDAP_LDFLAGS="-lldap" LDAP_CPPFLAGS="-I/usr/myinclude" ./configure
+#
+# This macro is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+AC_DEFUN([LIBLDAP_CHECK_CONFIG],
+[
+ AC_ARG_WITH(ldap,
+ [If you want to check LDAP servers:
+AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>@. DIR is the LDAP base install directory, default is to search through a number of common places for the LDAP files.])
+ ],[ if test "$withval" = "no"; then
+ want_ldap="no"
+ _libldap_with="no"
+ elif test "$withval" = "yes"; then
+ want_ldap="yes"
+ _libldap_with="yes"
+ else
+ want_ldap="yes"
+ _libldap_with=$withval
+ fi
+ ],[_libldap_with=ifelse([$1],,[no],[$1])])
+
+ if test "x$_libldap_with" != x"no"; then
+ AC_MSG_CHECKING(for LDAP support)
+
+ if test "$_libldap_with" = "yes"; then
+ if test -f /usr/local/openldap/include/ldap.h; then
+ LDAP_INCDIR=/usr/local/openldap/include/
+ LDAP_LIBDIR=/usr/local/openldap/lib/
+ elif test -f /usr/include/ldap.h; then
+ LDAP_INCDIR=/usr/include
+ LDAP_LIBDIR=/usr/lib
+ elif test -f /usr/local/include/ldap.h; then
+ LDAP_INCDIR=/usr/local/include
+ LDAP_LIBDIR=/usr/local/lib
+ else
+ found_ldap="no"
+ AC_MSG_RESULT(no)
+ fi
+ else
+ if test -f $_libldap_with/include/ldap.h; then
+ LIBLDAP_INCDIR=$_libldap_with/include
+ LIBLDAP_LIBDIR=$_libldap_with/lib
+ else
+ found_ldap="no"
+ AC_MSG_RESULT(no)
+ fi
+ fi
+
+ if test "x$found_ldap" != "xno" ; then
+
+ if test "x$enable_static" = "xyes"; then
+ LDAP_LIBS=" -llber -lgnutls -lpthread -lsasl2 $LDAP_LIBS"
+ fi
+
+ LIBLDAP_CPPFLAGS=-I$LIBLDAP_INCDIR
+ LIBLDAP_LDFLAGS="-L$LIBLDAP_LIBDIR -lldap $LDAP_LIBS"
+
+ found_ldap="yes"
+ AC_DEFINE(HAVE_LDAP,1,[Define to 1 if LDAP should be enabled.])
+ AC_MSG_RESULT(yes)
+ fi
+ fi
+
+ AC_SUBST(LIBLDAP_CPPFLAGS)
+ AC_SUBST(LIBLDAP_LDFLAGS)
+
+ unset _libldap_with
+])dnl
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
index 43f947ce..8e3b6a93 100644
--- a/m4/libcurl.m4
+++ b/m4/libcurl.m4
@@ -14,7 +14,7 @@
# Note that using --without-libcurl does run ACTION-IF-NO.
#
# This macro #defines HAVE_LIBCURL if a working libcurl setup is
-# found, and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary
+# found, and sets @LIBCURL_LDFLAGS@ and @LIBCURL_CPPFLAGS@ to the necessary
# values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are
# the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
# where yyy are the various protocols supported by libcurl. Both xxx
@@ -26,7 +26,7 @@
# curl-config list (e.g. it's "HTTP" and not "http").
#
# Users may override the detected values by doing something like:
-# LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
+# LIBCURL_LDFLAGS="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
#
# For the sake of sanity, this macro assumes that any libcurl that is
# found is after version 7.7.2, the first version that included the
@@ -57,20 +57,18 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
AC_ARG_WITH(libcurl,
- [
-If you want to use cURL library:
-AC_HELP_STRING([--with-libcurl@<:@=DIR@:>@],[use cURL library @<:@default=no@:>@, look for the curl library in DIR])],
+ [If you want to use cURL library:
+AC_HELP_STRING([--with-libcurl@<:@=DIR@:>@],[use cURL library @<:@default=yes@:>@, look for the curl library in DIR])],
[
if test "$withval" = "no"; then
_libcurl_with="no"
elif test "$withval" = "yes"; then
_libcurl_with="yes"
else
- _libcurl_with="yes"
+ _libcurl_with=$withval
fi
],
- [_libcurl_with="no"])
-dnl [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[no],[$1])])
+ [_libcurl_with=ifelse([$1],,[yes],[$1])])
if test "$_libcurl_with" != "no" ; then
@@ -112,15 +110,15 @@ dnl [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[no],[$1])])
if test x"$LIBCURL_CPPFLAGS" = "x" ; then
LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
fi
- if test x"$LIBCURL" = "x" ; then
- LIBCURL=`$_libcurl_config --libs`
+ if test x"$LIBCURL_LDFLAGS" = "x" ; then
+ LIBCURL_LDFLAGS=`$_libcurl_config --libs`
# This is so silly, but Apple actually has a bug in their
# curl-config script. Fixed in Tiger, but there are still
# lots of Panther installs around.
case "${host}" in
powerpc-apple-darwin7*)
- LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
+ LIBCURL_LDFLAGS=`echo $LIBCURL_LDFLAGS | sed -e 's|-arch i386||g'`
;;
esac
fi
@@ -143,7 +141,7 @@ dnl [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[no],[$1])])
# we didn't find curl-config, so let's see if the user-supplied
# link line (or failing that, "-lcurl") is enough.
- LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
+ LIBCURL_LDFLAGS=${LIBCURL_LDFLAGS-"$_libcurl_ldflags -lcurl"}
AC_CACHE_CHECK([whether libcurl is usable],
[libcurl_cv_lib_curl_usable],
@@ -151,7 +149,7 @@ dnl [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[no],[$1])])
_libcurl_save_cppflags=$CPPFLAGS
CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
_libcurl_save_libs=$LIBS
- LIBS="$LIBCURL $LIBS"
+ LIBS="$LIBCURL_LDFLAGS $LIBS"
AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
/* Try and use a few common options to force a failure if we are
@@ -180,7 +178,7 @@ x=CURLOPT_VERBOSE;
_libcurl_save_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
_libcurl_save_libs=$LIBS
- LIBS="$LIBS $LIBCURL"
+ LIBS="$LIBS $LIBCURL_LDFLAGS"
AC_CHECK_FUNC(curl_free,,
AC_DEFINE(curl_free,free,
@@ -194,7 +192,7 @@ x=CURLOPT_VERBOSE;
AC_DEFINE(HAVE_LIBCURL,1,
[Define to 1 if you have a functional curl library.])
AC_SUBST(LIBCURL_CPPFLAGS)
- AC_SUBST(LIBCURL)
+ AC_SUBST(LIBCURL_LDFLAGS)
for _libcurl_feature in $_libcurl_features ; do
AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
@@ -223,7 +221,7 @@ x=CURLOPT_VERBOSE;
eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
done
else
- unset LIBCURL
+ unset LIBCURL_LDFLAGS
unset LIBCURL_CPPFLAGS
fi
fi
diff --git a/m4/netsnmp.m4 b/m4/netsnmp.m4
new file mode 100644
index 00000000..5ec16781
--- /dev/null
+++ b/m4/netsnmp.m4
@@ -0,0 +1,91 @@
+# LIBNETSNMP_CHECK_CONFIG ([DEFAULT-ACTION])
+# ----------------------------------------------------------
+# Eugene Grigorjev <eugene@zabbix.com> Feb-02-2007
+#
+# Checks for net-snmp. DEFAULT-ACTION is the string yes or no to
+# specify whether to default to --with-net-snmp or --without-net-snmp.
+# If not supplied, DEFAULT-ACTION is no.
+#
+# This macro #defines HAVE_SNMP and HAVE_NETSNMP if a required header files is
+# found, and sets @SNMP_LDFLAGS@ and @SNMP_CPPFLAGS@ to the necessary
+# values.
+#
+# Users may override the detected values by doing something like:
+# SNMP_LDFLAGS="-lsnmp" SNMP_CPPFLAGS="-I/usr/myinclude" ./configure
+#
+# This macro is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+AC_DEFUN([LIBNETSNMP_CHECK_CONFIG],
+[
+ AC_ARG_WITH(net-snmp,
+[
+What SNMP package do you want to use (please select only one):
+AC_HELP_STRING([--with-net-snmp@<:@=ARG@:>@],
+ [use NET-SNMP package @<:@default=no@:>@, default is to search through a number of common places for the NET-SNMP files.])],[ if test "$withval" = "no"; then
+ want_netsnmp="no"
+ _libnetsnmp_with="no"
+ elif test "$withval" = "yes"; then
+ want_netsnmp="yes"
+ _libnetsnmp_with="yes"
+ else
+ want_netsnmp="yes"
+ _libnetsnmp_with=$withval
+ fi
+ ],[_libnetsnmp_with=ifelse([$1],,[no],[$1])])
+
+ if test "x$_libnetsnmp_with" != x"no"; then
+ AC_MSG_CHECKING(for NET-SNMP support)
+ if test "$_libnetsnmp_with" = "yes"; then
+ if test -f /usr/local/net-snmp/include/net-snmp-includes.h; then
+ SNMP_INCDIR=/usr/local/net-snmp/include/
+ SNMP_LIBDIR=/usr/local/net-snmp/lib/
+ elif test -f /usr/include/net-snmp/net-snmp-includes.h; then
+ SNMP_INCDIR=/usr/include
+ SNMP_LIBDIR=/usr/lib
+ elif test -f /usr/include/net-snmp-includes.h; then
+ SNMP_INCDIR=/usr/include
+ SNMP_LIBDIR=/usr/lib
+ elif test -f /usr/local/include/net-snmp/net-snmp-includes.h; then
+ SNMP_INCDIR=/usr/local/include
+ SNMP_LIBDIR=/usr/local/lib
+ elif test -f /usr/local/include/net-snmp-includes.h; then
+ SNMP_INCDIR=/usr/local/include
+ SNMP_LIBDIR=/usr/local/lib
+ else
+ found_netsnmp="no"
+ AC_MSG_RESULT(no)
+ fi
+ else
+ if test -f $_libnetsnmp_with/include/net-snmp/net-snmp-includes.h; then
+ SNMP_INCDIR=$_libnetsnmp_with/include
+ SNMP_LIBDIR=$_libnetsnmp_with/lib
+ elif test -f $withval/include/net-snmp-includes.h; then
+ SNMP_INCDIR=$_libnetsnmp_with/include
+ SNMP_LIBDIR=$_libnetsnmp_with/lib
+ else
+ found_netsnmp="no"
+ AC_MSG_RESULT(no)
+ fi
+ fi
+
+ if test "x$found_netsnmp" != "xno"; then
+ found_netsnmp="yes"
+ AC_MSG_RESULT(yes)
+
+ AC_CHECK_LIB(crypto, main, SNMP_LIBS="$SNMP_LIBS -lcrypto")
+
+ SNMP_CPPFLAGS=-I$SNMP_INCDIR
+ SNMP_LDFLAGS="-L$SNMP_LIBDIR $SNMP_LFLAGS -lnetsnmp $SNMP_LIBS"
+
+ AC_DEFINE(HAVE_NETSNMP,1,[Define to 1 if NET-SNMP should be enabled.])
+ AC_DEFINE(HAVE_SNMP,1,[Define to 1 if SNMP should be enabled.])
+ fi
+ fi
+
+ AC_SUBST(SNMP_CPPFLAGS)
+ AC_SUBST(SNMP_LDFLAGS)
+
+ unset _libnetsnmp_with
+])dnl
diff --git a/m4/sqlora8.m4 b/m4/sqlora8.m4
new file mode 100644
index 00000000..17896edb
--- /dev/null
+++ b/m4/sqlora8.m4
@@ -0,0 +1,105 @@
+# LIBSQLORA8_CHECK_CONFIG ([DEFAULT-ACTION])
+# ----------------------------------------------------------
+# Eugene Grigorjev <eugene@zabbix.com> Feb-02-2007
+#
+# Checks for Sqlora8. DEFAULT-ACTION is the string yes or no to
+# specify whether to default to --with-sqlora8 or --without-sqlora8
+# or --with-oracle or --without-oracle. If not supplied, DEFAULT-ACTION is no.
+#
+# This macro #defines HAVE_SQLORA8 if a required header files is
+# found, and sets @SQLORA8_LDFLAGS@ and @SQLORA8_CPPFLAGS@ to the necessary
+# values.
+#
+# Users may override the detected values by doing something like:
+# SQLORA8_LDFLAGS="-lsqlora8" SQLORA8_CPPFLAGS="-I/usr/myinclude" ./configure
+#
+# This macro is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+AC_DEFUN([LIBSQLORA8_CHECK_CONFIG],
+[
+ AC_ARG_WITH(oracle,
+ [
+What DBMS do you want to use (please select only one):
+AC_HELP_STRING([--with-oracle@<:@=ARG@:>@],
+ [use Sqlora8 library @<:@default=no@:>@, default is to search through a number of common places for the Sqlora8 files.])],[ if test "$withval" = "no"; then
+ want_sqlora8="no"
+ _libsqlora8_with="no"
+ elif test "$withval" = "yes"; then
+ want_sqlora8="yes"
+ _libsqlora8_with="yes"
+ else
+ want_sqlora8="yes"
+ _libsqlora8_with=$withval
+ fi
+ ],[_libsqlora8_with=ifelse([$1],,[no],[$1])])
+
+ if test "x$want_sqlora8" = "x" ; then
+ AC_ARG_WITH(sqlora8,
+ [AC_HELP_STRING([--with-sqlora8@<:@=ARG@:>@],
+ [use Sqlora8 library @<:@default=no@:>@, same as --with-oracle.])],[ if test "$withval" = "no"; then
+ want_sqlora8="no"
+ _libsqlora8_with="no"
+ elif test "$withval" = "yes"; then
+ want_sqlora8="yes"
+ _libsqlora8_with="yes"
+ else
+ want_sqlora8="yes"
+ _libsqlora8_with=$withval
+ fi
+ ],[_libsqlora8_with=ifelse([$1],,[no],[$1])])
+ fi
+
+ if test "x$_libsqlora8_with" != x"no"; then
+ AC_MSG_CHECKING(for Oracle support)
+
+ if test "$_libsqlora8_with" = "yes"; then
+ if test -f /usr/include/sqlora.h; then
+ SQLORA8_INCDIR=/usr/include
+ SQLORA8_LIBDIR=/usr/lib
+ elif test -f /usr/lib/libsqlora8/include/sqlora.h; then
+ SQLORA8_INCDIR=/usr/lib/libsqlora8/include
+ SQLORA8_LIBDIR=/usr/lib
+ elif test -f $SQLORA8_HOME/lib/sqlora8/include/sqlora.h; then
+ SQLORA8_INCDIR=$SQLORA8_HOME/lib/sqlora8/include
+ SQLORA8_LIBDIR=$SQLORA8_HOME/lib
+ elif test -f $SQLORA8_HOME/include/sqlora.h; then
+ SQLORA8_INCDIR=${SQLORA8_HOME}/include
+ SQLORA8_LIBDIR=${SQLORA8_HOME}/lib
+ else
+ found_libsqlora8="no"
+ AC_MSG_RESULT(no)
+ fi
+ else
+ if test -f $_libsqlora8_with/include/sqlora.h; then
+ SQLORA8_INCDIR=$_libsqlora8_with/include
+ SQLORA8_LIBDIR=$_libsqlora8_with/lib
+ elif test -f $withval/lib/libsqlora8/include/sqlora.h; then
+ SQLORA8_INCDIR=$_libsqlora8_with/lib/libsqlora8/include
+ SQLORA8_LIBDIR=$_libsqlora8_with/lib
+ elif test -f $withval/libsqlora8/include/sqlora.h; then
+ SQLORA8_INCDIR=$_libsqlora8_with/libsqlora8/include
+ SQLORA8_LIBDIR=$_libsqlora8_with
+ else
+ found_libsqlora8="no"
+ AC_MSG_RESULT(no)
+ fi
+ fi
+
+ if test "x$found_libsqlora8" != "xno" ; then
+ $found_libsqlora8="yes"
+ AC_MSG_RESULT(yes)
+
+ SQLORA8_CPPFLAGS="-I$SQLORA8_INCDIR"
+ SQLORA8_LDFLAGS="-L$SQLORA8_LIBDIR -lsqlora8"
+
+ AC_DEFINE(HAVE_SQLORA8,1,[Define to 1 if SQLORA8 library should be enabled.])
+ fi
+ fi
+
+ AC_SUBST(SQLORA8_CPPFLAGS)
+ AC_SUBST(SQLORA8_LDFLAGS)
+
+ unset _libsqlora8_with
+])dnl
diff --git a/m4/ucdsnmp.m4 b/m4/ucdsnmp.m4
new file mode 100644
index 00000000..933fd04b
--- /dev/null
+++ b/m4/ucdsnmp.m4
@@ -0,0 +1,91 @@
+# LIBSNMP_CHECK_CONFIG ([DEFAULT-ACTION])
+# ----------------------------------------------------------
+# Eugene Grigorjev <eugene@zabbix.com> Feb-02-2007
+#
+# Checks for snmp. DEFAULT-ACTION is the string yes or no to
+# specify whether to default to --with-ucd-snmp or --without-ucd-snmp.
+# If not supplied, DEFAULT-ACTION is no.
+#
+# This macro #defines HAVE_SNMP and HAVE_UCDSNMP if a required header files is
+# found, and sets @SNMP_LDFLAGS@ and @SNMP_CPPFLAGS@ to the necessary
+# values.
+#
+# Users may override the detected values by doing something like:
+# SNMP_LDFLAGS="-lsnmp" SNMP_CPPFLAGS="-I/usr/myinclude" ./configure
+#
+# This macro is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+AC_DEFUN([LIBSNMP_CHECK_CONFIG],
+[
+ AC_ARG_WITH(ucd-snmp,
+ [AC_HELP_STRING([--with-ucd-snmp@<:@=ARG@:>@],
+ [use UCD-SNMP package @<:@default=no@:>@, default is to search through a number of common places for the UCD-SNMP files.])
+ ],[ if test "$withval" = "no"; then
+ want_snmp="no"
+ _libsnmp_with="no"
+ elif test "$withval" = "yes"; then
+ want_snmp="yes"
+ _libsnmp_with="yes"
+ else
+ want_snmp="yes"
+ _libsnmp_with=$withval
+ fi
+ ],[_libsnmp_with=ifelse([$1],,[no],[$1])])
+
+ if test "x$_libsnmp_with" != x"no"; then
+ AC_MSG_CHECKING(for UCD-SNMP support)
+
+ if test "$_libsnmp_with" = "yes"; then
+ if test -f /usr/local/ucd-snmp/include/ucd-snmp-config.h; then
+ SNMP_INCDIR=/usr/local/ucd-snmp/include/
+ SNMP_LIBDIR=/usr/local/ucd-snmp/lib/
+ elif test -f /usr/include/ucd-snmp/ucd-snmp-config.h; then
+ SNMP_INCDIR=/usr/include
+ SNMP_LIBDIR=/usr/lib
+ elif test -f /usr/include/ucd-snmp-config.h; then
+ SNMP_INCDIR=/usr/include
+ SNMP_LIBDIR=/usr/lib
+ elif test -f /usr/local/include/ucd-snmp/ucd-snmp-config.h; then
+ SNMP_INCDIR=/usr/local/include
+ SNMP_LIBDIR=/usr/local/lib
+ elif test -f /usr/local/include/ucd-snmp-config.h; then
+ SNMP_INCDIR=/usr/local/include
+ SNMP_LIBDIR=/usr/local/lib
+ else
+ found_snmp="no"
+ AC_MSG_RESULT(no)
+ fi
+ else
+ if test -f $withval/include/ucd-snmp/ucd-snmp-config.h; then
+ SNMP_INCDIR=$withval/include
+ SNMP_LIBDIR=$withval/lib
+ elif test -f $withval/include/ucd-snmp-config.h; then
+ SNMP_INCDIR=$withval/include
+ SNMP_LIBDIR=$withval/lib
+ else
+ found_snmp="no"
+ AC_MSG_RESULT(no)
+ fi
+ fi
+
+ if test "x$found_snmp" != "xno" ; then
+ found_snmp="yes"
+ AC_MSG_RESULT(yes)
+
+ AC_CHECK_LIB(crypto, main, SNMP_LIBS="$SNMP_LIBS -lcrypto")
+
+ SNMP_CPPFLAGS=-I$SNMP_INCDIR
+ SNMP_LDFLAGS="-L$SNMP_LIBDIR $SNMP_LFLAGS -lsnmp $SNMP_LIBS"
+
+ AC_DEFINE(HAVE_UCDSNMP,1,[Define to 1 if UCD-SNMP should be enabled.])
+ AC_DEFINE(HAVE_SNMP,1,[Define to 1 if SNMP should be enabled.])
+ fi
+ fi
+
+ AC_SUBST(SNMP_LDFLAGS)
+ AC_SUBST(SNMP_CPPFLAGS)
+
+ unset _libsnmp_with
+])dnl
diff --git a/misc/Makefile.am b/misc/Makefile.am
new file mode 100644
index 00000000..38631ca0
--- /dev/null
+++ b/misc/Makefile.am
@@ -0,0 +1,9 @@
+## Process this file with automake to produce Makefile.in
+
+EXTRA_DIST = \
+ conf \
+ init.d \
+ snmptrap \
+ win32floppy/install.bat \
+ win32floppy/uninstall.bat \
+ win32floppy/README
diff --git a/src/Makefile.am b/src/Makefile.am
index 71989a3a..63facae2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,19 +1,24 @@
## Process this file with automake to produce Makefile.in
-AGENT_DIRS = zabbix_agent zabbix_get zabbix_sender
-SERVER_DIRS = zabbix_server
+DIST_SUBDIRS = \
+ libs \
+ zabbix_agent \
+ zabbix_get \
+ zabbix_sender \
+ zabbix_server
if AGENT
-AGENT_SUBDIRS = $(AGENT_DIRS)
-else
-AGENT_EXTRA_SUBDIRS = $(AGENT_DIRS)
+AGENT_SUBDIRS = \
+ zabbix_agent \
+ zabbix_get \
+ zabbix_sender
endif
if SERVER
-SERVER_SUBDIRS = $(SERVER_DIRS)
-else
-SERVER_EXTRA_SUBDIRS = $(SERVER_DIRS)
+SERVER_SUBDIRS = zabbix_server
endif
-SUBDIRS = libs $(AGENT_SUBDIRS) $(SERVER_SUBDIRS)
-EXTRA_SUBDIRS = $(AGENT_EXTRA_SUBDIRS) $(SERVER_EXTRA_SUBDIRS)
+SUBDIRS = \
+ libs \
+ $(AGENT_SUBDIRS) \
+ $(SERVER_SUBDIRS)
diff --git a/src/libs/Makefile.am b/src/libs/Makefile.am
index 37b5530b..9c76675b 100644
--- a/src/libs/Makefile.am
+++ b/src/libs/Makefile.am
@@ -1,12 +1,24 @@
## Process this file with automake to produce Makefile.in
-SERVER_DIRS = zbxdbhigh zbxemail zbxsms zbxcomms
+DIST_SUBDIRS = \
+ zbxdbhigh \
+ zbxemail \
+ zbxsms \
+ zbxcomms \
+ zbxcrypto \
+ zbxcommon \
+ zbxlog \
+ zbxnet \
+ zbxnix \
+ zbxconf \
+ zbxsysinfo \
+ zbxplugin \
+ zbxsys
if SERVER
-SERVER_SUBDIRS = $(SERVER_DIRS)
-else
-EXTRA_SUBDIRS = $(SERVER_DIRS)
+SERVER_SUBDIRS = zbxdbhigh zbxemail zbxsms zbxcomms
endif
SUBDIRS = zbxcrypto zbxcommon zbxlog zbxnet zbxnix zbxconf zbxsysinfo zbxplugin zbxsys $(SERVER_SUBDIRS)
+EXTRA_DISTR = zbxwin32
diff --git a/src/libs/zbxcommon/Makefile.am b/src/libs/zbxcommon/Makefile.am
index e9efd230..65d2c90d 100644
--- a/src/libs/zbxcommon/Makefile.am
+++ b/src/libs/zbxcommon/Makefile.am
@@ -11,4 +11,4 @@ libzbxcommon_a_SOURCES = \
zbxgetopt.c \
alias.c
-EXTRA_DIR = gnuregex.c
+EXTRA_DIST = gnuregex.c
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c
index be5dc8e0..d174d23e 100644
--- a/src/libs/zbxdbhigh/db.c
+++ b/src/libs/zbxdbhigh/db.c
@@ -358,12 +358,12 @@ int DBexecute(const char *fmt, ...)
}
lbl_exec:
- if(SQLITE_OK != (sql_ret = sqlite3_exec(sqlite, sql, NULL, 0, &error)))
+ if(SQLITE_OK != (ret = sqlite3_exec(sqlite, sql, NULL, 0, &error)))
{
- if(sql_ret == SQLITE_BUSY) goto lbl_exec; /* attention deadlock!!! */
+ if(ret == SQLITE_BUSY) goto lbl_exec; /* attention deadlock!!! */
zabbix_log( LOG_LEVEL_ERR, "Query::%s",sql);
- zabbix_log(LOG_LEVEL_ERR, "Query failed [%i]:%s", sql_ret, error);
+ zabbix_log(LOG_LEVEL_ERR, "Query failed [%i]:%s", ret, error);
sqlite3_free(error);
if(!sqlite_transaction_started)
{
@@ -523,8 +523,8 @@ DB_RESULT DBselect(const char *fmt, ...)
sqlo_stmt_handle_t sth;
#endif
#ifdef HAVE_SQLITE3
- int sql_ret = SUCCEED;
- char *error=0;
+ int ret = FAIL;
+ char *error=NULL;
#endif
gettimeofday(&tv, NULL);
diff --git a/src/libs/zbxsysinfo/Makefile.am b/src/libs/zbxsysinfo/Makefile.am
index 76c73a91..8fb3d66c 100644
--- a/src/libs/zbxsysinfo/Makefile.am
+++ b/src/libs/zbxsysinfo/Makefile.am
@@ -12,16 +12,27 @@ libzbxsysinfo_a_SOURCES = \
common/http.c \
@ARCH@/@ARCH@.c
-EXTRA_SUBDIRS = \
- aix aix/aix.c \
- common \
- freebsd freebsd/freebsd.c \
- hpux hpux/hpux.c \
- linux linux/linux.c \
- netbsd netbsd/netbsd.c \
- openbsd openbsd/openbsd.c \
- osf osf/osf.c \
- osx osx/osx.c \
- solaris solaris/solaris.c \
- unknown unknown/unknown.c \
+DIST_SUBDIRS = \
+ aix \
+ freebsd \
+ hpux \
+ linux \
+ netbsd \
+ openbsd \
+ osf \
+ osx \
+ solaris \
+ unknown
+
+EXTRA_DIST = \
+ aix/aix.c \
+ freebsd/freebsd.c \
+ hpux/hpux.c \
+ linux/linux.c \
+ netbsd/netbsd.c \
+ openbsd/openbsd.c \
+ osf/osf.c \
+ osx/osx.c \
+ solaris/solaris.c \
+ unknown/unknown.c \
win32
diff --git a/src/zabbix_agent/Makefile.am b/src/zabbix_agent/Makefile.am
index 80a4d4a9..87af71a2 100644
--- a/src/zabbix_agent/Makefile.am
+++ b/src/zabbix_agent/Makefile.am
@@ -1,17 +1,15 @@
## Process this file with automake to produce Makefile.in
-AM_LDFLAGS = $(LDAP_LFLAGS)
-
-LDADD = \
- ../libs/zbxsysinfo/libzbxsysinfo.a \
- ../libs/zbxsysinfo/$(ARCH)/libzbxsysinfo2.a \
- ../libs/zbxlog/libzbxlog.a \
- ../libs/zbxsys/libzbxsys.a \
- ../libs/zbxnix/libzbxnix.a \
- ../libs/zbxnet/libzbxnet.a \
- ../libs/zbxconf/libzbxconf.a \
- ../libs/zbxcommon/libzbxcommon.a \
- ../libs/zbxcrypto/libzbxcrypto.a $(LDAP_LIBS)
+agents_ldadd = \
+ $(top_srcdir)/src/libs/zbxsysinfo/libzbxsysinfo.a \
+ $(top_srcdir)/src/libs/zbxsysinfo/$(ARCH)/libzbxsysinfo2.a \
+ $(top_srcdir)/src/libs/zbxlog/libzbxlog.a \
+ $(top_srcdir)/src/libs/zbxsys/libzbxsys.a \
+ $(top_srcdir)/src/libs/zbxnix/libzbxnix.a \
+ $(top_srcdir)/src/libs/zbxnet/libzbxnet.a \
+ $(top_srcdir)/src/libs/zbxconf/libzbxconf.a \
+ $(top_srcdir)/src/libs/zbxcommon/libzbxcommon.a \
+ $(top_srcdir)/src/libs/zbxcrypto/libzbxcrypto.a
bin_PROGRAMS = \
zabbix_agent \
@@ -21,6 +19,12 @@ zabbix_agent_SOURCES = \
zabbix_agent.c zabbix_agent.h \
zbxconf.c zbxconf.h
+zabbix_agent_LDADD = $(agents_ldadd)
+
+zabbix_agent_CPPFLAGS = $(LDAP_CPPFLAGS)
+
+zabbix_agent_LDFLAGS = $(LDAP_LDFLAGS)
+
zabbix_agentd_SOURCES = \
active.c active.h \
stats.c stats.h \
@@ -33,4 +37,8 @@ zabbix_agentd_SOURCES = \
listener.c listener.h \
eventlog.c eventlog.h
-zabbix_agentd_CPPFLAGS = -DZABBIX_DAEMON
+zabbix_agentd_LDADD = $(agents_ldadd)
+
+zabbix_agentd_CPPFLAGS = -DZABBIX_DAEMON $(LDAP_CPPFLAGS)
+
+zabbix_agentd_LDFLAGS = $(LDAP_LDFLAGS)
diff --git a/src/zabbix_server/Makefile.am b/src/zabbix_server/Makefile.am
index 01321679..9621628d 100644
--- a/src/zabbix_server/Makefile.am
+++ b/src/zabbix_server/Makefile.am
@@ -22,8 +22,6 @@ zabbix_server_SOURCES = \
functions.c functions.h \
server.c
-zabbix_server_CPPFLAGS = -DZABBIX_DAEMON $(DB_CPPFLAGS) $(SNMP_INCLUDE) $(LIBCURL_CPPFLAGS)
-
zabbix_server_LDADD = \
alerter/libzbxalerter.a \
pinger/libzbxpinger.a \
@@ -34,18 +32,20 @@ zabbix_server_LDADD = \
nodewatcher/libzbxnodewatcher.a \
utils/libzbxutils.a \
httppoller/libzbxhttppoller.a \
- ../libs/zbxsysinfo/libzbxsysinfo.a \
- ../libs/zbxsysinfo/$(ARCH)/libzbxsysinfo2.a \
- ../libs/zbxlog/libzbxlog.a \
- ../libs/zbxnix/libzbxnix.a \
- ../libs/zbxsys/libzbxsys.a \
- ../libs/zbxconf/libzbxconf.a \
- ../libs/zbxemail/libzbxemail.a \
- ../libs/zbxnet/libzbxnet.a \
- ../libs/zbxsms/libzbxsms.a \
- ../libs/zbxdbhigh/libzbxdbhigh.a \
- ../libs/zbxcommon/libzbxcommon.a \
- ../libs/zbxcrypto/libzbxcrypto.a \
- ../libs/zbxcomms/libzbxcomms.a
+ $(top_srcdir)/src/libs/zbxsysinfo/libzbxsysinfo.a \
+ $(top_srcdir)/src/libs/zbxsysinfo/$(ARCH)/libzbxsysinfo2.a \
+ $(top_srcdir)/src/libs/zbxlog/libzbxlog.a \
+ $(top_srcdir)/src/libs/zbxnix/libzbxnix.a \
+ $(top_srcdir)/src/libs/zbxsys/libzbxsys.a \
+ $(top_srcdir)/src/libs/zbxconf/libzbxconf.a \
+ $(top_srcdir)/src/libs/zbxemail/libzbxemail.a \
+ $(top_srcdir)/src/libs/zbxnet/libzbxnet.a \
+ $(top_srcdir)/src/libs/zbxsms/libzbxsms.a \
+ $(top_srcdir)/src/libs/zbxdbhigh/libzbxdbhigh.a \
+ $(top_srcdir)/src/libs/zbxcommon/libzbxcommon.a \
+ $(top_srcdir)/src/libs/zbxcrypto/libzbxcrypto.a \
+ $(top_srcdir)/src/libs/zbxcomms/libzbxcomms.a
+
+zabbix_server_CPPFLAGS = -DZABBIX_DAEMON $(DB_CPPFLAGS) $(SNMP_CPPFLAGS) $(LDAP_CPPFLAGS) $(LIBCURL_CPPFLAGS)
-zabbix_server_LDFLAGS = $(DB_LDFLAGS) $(SNMP_LIBS) $(LDAP_LIBS) $(LIBCURL)
+zabbix_server_LDFLAGS = $(DB_LDFLAGS) $(SNMP_LDFLAGS) $(LDAP_LDFLAGS) $(LIBCURL_LDFLAGS)
diff --git a/src/zabbix_server/httppoller/Makefile.am b/src/zabbix_server/httppoller/Makefile.am
index 03d3b1f4..ef6b8432 100644
--- a/src/zabbix_server/httppoller/Makefile.am
+++ b/src/zabbix_server/httppoller/Makefile.am
@@ -7,4 +7,4 @@ libzbxhttppoller_a_SOURCES = \
httptest.c httptest.h \
httppoller.c httppoller.h
-libzbxhttppoller_a_CPPFLAGS = $(DB_CPPFLAGS) $(SNMP_INCLUDE)
+libzbxhttppoller_a_CPPFLAGS = $(DB_CPPFLAGS) $(SNMP_CPPFLAGS)
diff --git a/src/zabbix_server/poller/Makefile.am b/src/zabbix_server/poller/Makefile.am
index 3a0261cb..9148464d 100644
--- a/src/zabbix_server/poller/Makefile.am
+++ b/src/zabbix_server/poller/Makefile.am
@@ -10,4 +10,4 @@ libzbxpoller_a_SOURCES = \
checks_aggregate.c checks_aggregate.h \
poller.c poller.h
-libzbxpoller_a_CPPFLAGS = $(DB_CPPFLAGS) $(SNMP_INCLUDE)
+libzbxpoller_a_CPPFLAGS = $(DB_CPPFLAGS) $(SNMP_CPPFLAGS)