powerguru-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Powerguru-commit] [SCM] powerguru branch, master, updated. 885b34f389c1


From: Rob Savoye
Subject: [Powerguru-commit] [SCM] powerguru branch, master, updated. 885b34f389c1338dfb95f57df57f60bae8b3231f
Date: Fri, 09 Dec 2011 18:45:31 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "powerguru".

The branch, master has been updated
       via  885b34f389c1338dfb95f57df57f60bae8b3231f (commit)
       via  f10d4b70595d42eaaf3c34cf1fcf327f46f81699 (commit)
       via  73da7e432136a5f9dec84f8f7f0215a5d8304703 (commit)
       via  33bc3700c1960a0f214088acaa310f4b6a3ed12a (commit)
      from  3bca3f920c782a45911cff229a0e6b4d8ac7acb0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=885b34f389c1338dfb95f57df57f60bae8b3231f


commit 885b34f389c1338dfb95f57df57f60bae8b3231f
Author: Rob Savoye <address@hidden>
Date:   Fri Dec 9 11:45:22 2011 -0700

    add option for enabling/disabling the simulator

diff --git a/configure.ac b/configure.ac
index 65b209c..422781f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,10 +135,18 @@ AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(PACKAGE_LIBS)
 
 AM_PATH_MYSQL
-if test x$snmp = xtrue; then
-  AM_PATH_SNMP
-fi
-AM_CONDITIONAL(SNMP, test x$snmp = xtrue)
+AM_PATH_SNMP
+AM_CONDITIONAL(BUILD_SNMP, test x$snmp = xtrue)
+
+sim=false
+AC_ARG_ENABLE(sim, [  --enable-sim           enable support for Sim 
(default=yes)],
+[case "${enableval}" in
+  yes) sim=true ;;
+  no)  sim=false ;;
+  *)   AC_MSG_ERROR([bad value ${enableval} for enable-malloc option]) ;;
+esac])
+
+AM_CONDITIONAL(BUILD_SIM, test x${sim} = xtrue)
 
 dnl link to the images so we can browse the HTML output before
 dnl installing it.
@@ -169,6 +177,12 @@ else
   echo "        Not using SNMP"
 fi
 
+if test x$sim = xtrue; then
+  echo "        Using the simulator"
+else
+  echo "        Not using the simulator"
+fi
+
 dnl Dmalloc
 if test x$dmalloc = xyes; then
   echo "        Using DMALLOC"

http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=f10d4b70595d42eaaf3c34cf1fcf327f46f81699


commit f10d4b70595d42eaaf3c34cf1fcf327f46f81699
Author: Rob Savoye <address@hidden>
Date:   Fri Dec 9 11:44:37 2011 -0700

    this is generated by autogen.sh now

diff --git a/config.h.in b/config.h.in
deleted file mode 100644
index 7adb392..0000000
--- a/config.h.in
+++ /dev/null
@@ -1,95 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Gettext package. */
-#undef GETTEXT_PACKAGE
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Use XML */
-#undef HAVE_LIBXML
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Mysql package */
-#undef HAVE_MYSQL
-
-/* Use POSIX Threads */
-#undef HAVE_PTHREADS
-
-/* NET-SNMP package */
-#undef HAVE_SNMP
-
-/* Define to 1 if you have the <stdarg.h> header file. */
-#undef HAVE_STDARG_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <syslog> header file. */
-#undef HAVE_SYSLOG
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Use DMalloc */
-#undef USE_DMALLOC
-
-/* Use Dom parser */
-#undef USE_DOM
-
-/* Use SNMP */
-#undef USE_SNMP
-
-/* Use xmlReader parser */
-#undef USE_XMLREADER
-
-/* Version number of package */
-#undef VERSION

http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=73da7e432136a5f9dec84f8f7f0215a5d8304703


commit 73da7e432136a5f9dec84f8f7f0215a5d8304703
Author: Rob Savoye <address@hidden>
Date:   Fri Dec 9 11:44:00 2011 -0700

    fix to work with optional SNMP libraries

diff --git a/Makefile.am b/Makefile.am
index 98e3034..98585ba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,11 +21,20 @@ AUTOMAKE_OPTIONS = dejagnu
 
 ACLOCAL_AMFLAGS = -I macros
 
-STD_DIRS = lib daemon doc sim client # testsuite
-if SNMP
-SUBDIRS = snmp $(STD_DIRS) #src
-else
-SUBDIRS = $(STD_DIRS) #src
+# these have to be built first
+SUBDIRS = lib doc
+
+# this is an optional build directory
+if BUILD_SNMP
+SUBDIRS += snmp $(STD_DIRS) #src
+endif
+
+# These are built now, as they depend on the the libraries
+SUBDIRS += daemon client # testsuite
+
+# this is an optional build directory
+if BUILD_SIM
+SUBDIRS += sim
 endif
 
 EXTRA_DIST = \
diff --git a/client/Makefile.am b/client/Makefile.am
index b24af2b..bc9e457 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -24,7 +24,11 @@ bin_PROGRAMS = pguru
 INCLUDES = -I$(top_srcdir)/lib $(XML_CPPFLAGS)
 
 pguru_SOURCES = cmd.cc
-pguru_LDADD =  $(PGURU) $(XML_LIBS) $(MYSQL_LIBS) -lpthread
+pguru_LDADD = $(PGURU) $(XML_LIBS) $(MYSQL_LIBS) -lpthread $(SNMP_LIBS)
+if BUILD_SNMP
+pguru_LDADD += ../snmp/libpgsnmp.la
+endif
+
 pguru_DEPENDENCIES = $(PGURU)
 
 
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 6da0f27..8320213 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = # dejagnu
 
 AM_CPPFLAGS = -Wall
 
-if SNMP
+if BUILD_SNMP
   SNMP_LA = ../snmp/libpgsnmp.la
   SNMP_FILES = $(SNMP_LA) $(SNMP_LIBS)
   SNMP_INCLUDES =  -I$(SNMP_CFLAGS)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 87b2964..616476e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -34,9 +34,9 @@ INCLUDES = \
        -I.. $(XML_CPPFLAGS) \
        $(MYSQL_CFLAGS)
 
-if SNMP
+if BUILD_SNMP
 SNMP_FILES = snmp.cc snmp.h
-libpguru_la_LIBDADD =  $(SNMP_LIBS)
+libpguru_la_LIBDADD =  $(SNMP_LIBS) ../snmp/libpgsnmp.la
 endif
 
 # Bulding sharedlib requires adding all the libtool libraries
@@ -75,53 +75,6 @@ include_HEADERS = \
 
 #libpguru_la_LDFLAGS = -module -avoid-version -no-undefined
 
-# These are basically copied from the Makefile.in produced by Automake.
-# Unfortunately the -local options for changing these don't work...
-# so we have to redefine them since we want to install with the package
-# name for our library and headers to avoid any problems. So the only
-# thing changes is includedir to pkgincludedir and libdir to pkglibdir.
-install-includeHEADERS:
-       @$(NORMAL_INSTALL)
-       test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
-       @list='$(include_HEADERS)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f=$(am__strip_dir) \
-         echo " $(includeHEADERS_INSTALL) '$$d$$p' 
'$(DESTDIR)$(pkgincludedir)/$$f'"; \
-         $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
-       done
-
-uninstall-includeHEADERS: uninstall-libLTLIBRARIES
-       @$(NORMAL_UNINSTALL)
-       @list='$(include_HEADERS)'; for p in $$list; do \
-         f=$(am__strip_dir) \
-         echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
-         rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
-       done
-
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-       @$(NORMAL_INSTALL)
-       test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
-         else :; fi; \
-       done
-
-uninstall-libLTLIBRARIES:
-       @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f 
'$(DESTDIR)$(pkglibdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
-       done
-
-# Rebuild with GCC 4.x Mudflap support
-mudflap:
-       @echo "Rebuilding with GCC Mudflap support"
-       $(MAKE) CXXFLAGS="$(CXXFLAGS) -fmudflap" LDFLAGS="$(LDFLAGS) -lmudflap"
-
 clean-hook:
        -rm -f core.*
 
diff --git a/sim/Makefile.am b/sim/Makefile.am
index f1005b5..6b82510 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -23,7 +23,10 @@ noinst_PROGRAMS = osim # xsim
 INCLUDES = -I$(top_srcdir)/lib  $(XML_CPPFLAGS)
 
 osim_SOURCES = fakeuart.cc fakeuart.h osim.cc
-osim_LDADD =  $(PGURU) $(MYSQL_LIBS) $(XML_LIBS) -lpthread
-osim_DEPENDENCIES = $(PGURU)
+osim_LDADD =  $(PGURU) $(MYSQL_LIBS) $(XML_LIBS)  $(SNMP_LIBS) -lpthread
+if BUILD_SNMP
+osim_LDADD += ../snmp/libpgsnmp.la
+endif
 
+osim_DEPENDENCIES = $(PGURU)
 
diff --git a/snmp/Makefile.am b/snmp/Makefile.am
index 084fc48..f4e26e4 100644
--- a/snmp/Makefile.am
+++ b/snmp/Makefile.am
@@ -32,6 +32,7 @@ libpgsnmp_la_SOURCES = \
 #              ifTable_data_set.c
 
 INCLUDES = -I$(srcdir) -I.. $(SNMP_CFLAGS)
+libpgsnmp_la_LIBDADD =  $(SNMP_LIBS)
 
 generate-templates:
        @echo "Generating templates from PowerGuru MIB for Xantrex"
@@ -39,25 +40,6 @@ generate-templates:
        @echo "Generating templates from PowerGuru MIB for Outback"
        @mib2c outback
 
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-       @$(NORMAL_INSTALL)
-       test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
-       @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           f=$(am__strip_dir) \
-           echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
-           $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) 
$(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
-         else :; fi; \
-       done
-
-uninstall-libLTLIBRARIES:
-       @$(NORMAL_UNINSTALL)
-       @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-         p=$(am__strip_dir) \
-         echo " $(LIBTOOL) --mode=uninstall rm -f 
'$(DESTDIR)$(pkglibdir)/$$p'"; \
-         $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
-       done
-
 # snmptranslate -M+. -mPOWERGURU-MIB -Tp -IR powerguru
 # mib2c -c mib2c.scalar.conf powerGuru
 # mib2c -c mib2c.column_defines.conf powerGuru

http://git.savannah.gnu.org/cgit/powerguru.git/commit/?id=33bc3700c1960a0f214088acaa310f4b6a3ed12a


commit 33bc3700c1960a0f214088acaa310f4b6a3ed12a
Author: Rob Savoye <address@hidden>
Date:   Fri Dec 9 11:43:17 2011 -0700

    fix prototypes for C++

diff --git a/snmp/powerguru.h b/snmp/powerguru.h
index 6f5ccee..4497c18 100644
--- a/snmp/powerguru.h
+++ b/snmp/powerguru.h
@@ -22,9 +22,36 @@
 #ifndef POWERGURU_H
 #define POWERGURU_H
 
+#include <net-snmp/net-snmp-config.h>
+#include <net-snmp/net-snmp-includes.h>
+#include <net-snmp/agent/net-snmp-agent-includes.h>
+#include <net-snmp/agent/scalar.h>
+
 /*
  * function declarations 
  */
+#if defined(__cplusplus) && defined(__GNUC__)
+extern "C" {
+  
+void            init_powerguru(void);
+  
+Netsnmp_Node_Handler handle_powerGuruDataLog;
+Netsnmp_Node_Handler handle_powerGuruUnitAddress;
+Netsnmp_Node_Handler handle_powerGuruChargeAmps;
+Netsnmp_Node_Handler handle_powerGuruPVAmps;
+Netsnmp_Node_Handler handle_powerGuruPVVolts;
+Netsnmp_Node_Handler handle_powerGuruDailyKW;
+Netsnmp_Node_Handler handle_powerGuruAuxMode;
+Netsnmp_Node_Handler handle_powerGuruErrorMode;
+Netsnmp_Node_Handler handle_powerGuruChargerMode;
+Netsnmp_Node_Handler handle_powerGuruBatteryVolts;
+Netsnmp_Node_Handler handle_powerGuruLoadAmps;
+Netsnmp_Node_Handler handle_powerGuruACBuyAmps;
+Netsnmp_Node_Handler handle_powerGuruACInputVolts;
+Netsnmp_Node_Handler handle_powerGuruACOutputVolts;
+Netsnmp_Node_Handler handle_powerGuruACSellAmps;
+}
+#else
 void            init_powerguru(void);
 Netsnmp_Node_Handler handle_powerGuruDataLog;
 Netsnmp_Node_Handler handle_powerGuruUnitAddress;
@@ -42,4 +69,5 @@ Netsnmp_Node_Handler handle_powerGuruACInputVolts;
 Netsnmp_Node_Handler handle_powerGuruACOutputVolts;
 Netsnmp_Node_Handler handle_powerGuruACSellAmps;
 
-#endif                          /* POWERGURU_H */
+#endif  /* cplusplus */
+#endif  /* POWERGURU_H */

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am        |   19 ++++++++---
 client/Makefile.am |    6 +++-
 config.h.in        |   95 ----------------------------------------------------
 configure.ac       |   22 ++++++++++--
 daemon/Makefile.am |    2 +-
 lib/Makefile.am    |   51 +---------------------------
 sim/Makefile.am    |    7 +++-
 snmp/Makefile.am   |   20 +----------
 snmp/powerguru.h   |   30 ++++++++++++++++-
 9 files changed, 75 insertions(+), 177 deletions(-)
 delete mode 100644 config.h.in


hooks/post-receive
-- 
powerguru



reply via email to

[Prev in Thread] Current Thread [Next in Thread]