Index: dependencies.mak
===================================================================
--- dependencies.mak	(revision 17029)
+++ dependencies.mak	(working copy)
@@ -126,6 +126,13 @@
 sipXcdrLog : sipXrest 
 	@echo sipXcdrLog
 
+.PHONY: sipXagentX
+sipXagentX :
+	@echo sipXagentX
+
+
+
+
 .PHONY: sipXecs
 sipXecs : \
 	sipXcallController \
@@ -149,5 +156,6 @@
 	sipXsaa \
 	sipXsupervisor \
 	sipXtools \
+	sipXagentX \
 	doc
 	@echo sipXecs
Index: configure.ac
===================================================================
--- configure.ac	(revision 17029)
+++ configure.ac	(working copy)
@@ -23,6 +23,17 @@
 
 AC_CONFIG_SUBDIRS(doc)
 
+AC_ARG_ENABLE(agentx,
+  AC_HELP_STRING([--enable-agentx],
+    [sipXpbx agentx]),
+      agentx=yes, agentx=no)
+
+if test x$agentx = xyes
+then
+  AC_CONFIG_SUBDIRS(sipXagentX)
+fi
+
+
 AC_ARG_ENABLE(server,
   AC_HELP_STRING([--disable-server],
     [SIP servers, proxy, registrar, webui, mediaserver, etc. ]),
Index: config/sipXlib.m4
===================================================================
--- config/sipXlib.m4	(revision 17029)
+++ config/sipXlib.m4	(working copy)
@@ -86,6 +86,8 @@
     AC_SUBST(SIPX_RUNDIR,  [${localstatedir}/run/sipxpbx])
     AC_SUBST(SIPX_VARLIB,  [${localstatedir}/lib/sipxpbx])
     AC_SUBST(SIPX_VXMLDATADIR,[${localstatedir}/sipxdata/mediaserver/data])
+    AC_SUBST(SIPX_MIBDIR, [${datadir}/snmp/mibs])
+    AC_SUBST(SIPX_AGENTXDIR, [${datadir}/sipxpbx/agentx])
 
 
     ## Used in a number of different project and subjective where this should really go
Index: config/general.m4
===================================================================
--- config/general.m4	(revision 17029)
+++ config/general.m4	(working copy)
@@ -1,3 +1,73 @@
+# These are for sipxagentxlib project ...
+# # This is to check for net-snmp-config command. We need it in order to compile the sources
+AC_DEFUN([CHECK_NET_SNMP_CONFIG],
+[
+   AC_ARG_WITH(net_snmp_config,
+      [--with-net-snmp-config=PATH to the net-snmp-config executable],
+      [net_snmp_config_program=$withval/net-snmp-config],
+      [net_snmp_config_program=""],
+      )
+   if test x_$net_snmp_config_program != x_; then
+      AC_MSG_RESULT([Using net-snmp-config from --with-net-snmp-config $net_snmp_config_program])
+      AC_SUBST(NET_SNMP_CONFIG_PROGRAM, $net_snmp_config_program)
+   else
+      AC_PATH_PROG([NET_SNMP_CONFIG_PROGRAM], [net-snmp-config],
+         [net-snmp-config],
+         [$PATH:/bin:/usr/bin:/usr/local/bin]
+         )
+   fi
+
+   if ! test -x $NET_SNMP_CONFIG_PROGRAM; then
+      AC_MSG_ERROR([Cannot execute $NET_SNMP_CONFIG_PROGRAM.])
+   fi
+])
+
+# This is to check for the xml2-config command. Again, we need it in order to compile the sources
+AC_DEFUN([CHECK_XML2_CONFIG],
+[
+   AC_ARG_WITH(xml2_config,
+      [--with-xml2-config=PATH to the xml2-config executable],
+      [xml2_config_program=$withval/xml2-config],
+      [xml2_config_program=""],
+      )
+   if test x_$xml2_config_program != x_; then
+      AC_MSG_RESULT([Using xml2-config from --with-xml2-config $xml2_config_program])
+      AC_SUBST(XML2_CONFIG_PROGRAM, $xml2_config_program)
+   else
+      AC_PATH_PROG([XML2_CONFIG_PROGRAM], [xml2-config],
+      [xml2-config],
+      [$PATH:/bin:/usr/bin:/usr/local/bin]
+      )
+   fi
+
+   if ! test -x $XML2_CONFIG_PROGRAM; then
+      AC_MSG_ERROR([Cannot execute $XML2_CONFIG_PROGRAM.])
+   fi
+])
+
+# This is to check for the pg_config command.
+AC_DEFUN([CHECK_PG_CONFIG],
+[
+   AC_ARG_WITH(pg_config,
+      [--with-pg_config=PATH to the pg_config executable],
+      [pg_config_program=$withval/pg_config],
+      [pg_config_program=""],
+      )
+   if test x_$pg_config_program != x_; then
+      AC_MSG_RESULT([Using pg_config from --with-pg_config $pg_config_program])
+      AC_SUBST(PG_CONFIG_PROGRAM, $pg_config_program)
+   else
+      AC_PATH_PROG([PG_CONFIG_PROGRAM], [pg_config],
+         [pg_config],
+         [$PATH:/bin:/usr/bin:/usr/local/bin]
+         )
+   fi
+
+   if ! test -x $PG_CONFIG_PROGRAM; then
+      AC_MSG_ERROR([Cannot execute $PG_CONFIG_PROGRAM.])
+   fi
+])
+
 ##
 ## AC macros for general packages like OpenSSL, Xerces, etc
 ##
Index: config/subdir.am
===================================================================
--- config/subdir.am	(revision 17029)
+++ config/subdir.am	(working copy)
@@ -86,8 +86,11 @@
 		  -e 's,@FREESWITCH_PREFIX\@,@FREESWITCH_PREFIX@,g' \
 		  -e 's,@OPENFIRE_HOME\@,@OPENFIRE_HOME@,g' \
 		  -e 's,@DATE_PARSE_ARGS\@,@DATE_PARSE_ARGS@,g' \
-		  -e 's,@XARGS_REPLACE\@,@XARGS_REPLACE@,g'
+                  -e 's,@XARGS_REPLACE\@,@XARGS_REPLACE@,g' \
+                  -e 's,@SIPX_MIBDIR\@,@SIPX_MIBDIR@,g' \
+                  -e 's,@SIPX_AGENTXDIR\@,@SIPX_AGENTXDIR@,g'
 
+
 ################################################################
 # localize and install process definition based on:
 # SIPX_PROCESS_DEFS : the process definition file name without '-process.xml'
