Implement sendTrap function
This function gets all the objects from the specific
notification class and send the snmp trap using the
netsnmp lib functions.
This commt adds the configure, makefile, bootstrap.sh,
clangformat file.
Add the unit test cases for ErrorNotification unit.
Change-Id: I2e982f18eb2745f2c0c8de0702cc85d12e80f6e3
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..a32dbdc
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,55 @@
+AC_PREREQ([2.69])
+AC_INIT([phosphor-snmp], [1.0], [https://github.com/openbmc/openbmc/phosphor-snmp.git])
+AC_LANG([C++])
+AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign])
+AM_SILENT_RULES([yes])
+
+# Compiler flags
+CXXFLAGS="$CXXFLAGS -fpic -Wall -Werror"
+
+# Check for programs
+AC_PROG_CXX
+AM_PROG_AR
+AC_PROG_INSTALL
+AC_PROG_MAKE_SET
+
+LT_PREREQ([2.4.6])
+LT_INIT([dlopen disable-static shared])
+
+AC_CHECK_HEADERS([net-snmp/net-snmp-config.h],,\
+ AC_MSG_ERROR(["Requires net-snmp headers"]))
+
+# Checks for library functions
+LT_INIT # Required for systemd linking
+
+# Check/set gtest specific functions.
+AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-GTEST_HAS_PTHREAD=0"])
+AC_SUBST(GTEST_CPPFLAGS)
+
+# Add the code covererage
+AX_CODE_COVERAGE
+
+AC_ARG_ENABLE([oe-sdk],
+ AS_HELP_STRING([--enable-oe-sdk], [Link testcases absolutely against OE SDK so they can be ran within it.])
+)
+AC_ARG_VAR(OECORE_TARGET_SYSROOT,
+ [Path to the OE SDK SYSROOT])
+AS_IF([test "x$enable_oe_sdk" == "xyes"],
+ AS_IF([test "x$OECORE_TARGET_SYSROOT" == "x"],
+ AC_MSG_ERROR([OECORE_TARGET_SYSROOT must be set with --enable-oe-sdk])
+ )
+ AC_MSG_NOTICE([Enabling OE-SDK at $OECORE_TARGET_SYSROOT])
+ [
+ testcase_flags="-Wl,-rpath,\${OECORE_TARGET_SYSROOT}/lib"
+ testcase_flags="${testcase_flags} -Wl,-rpath,\${OECORE_TARGET_SYSROOT}/usr/lib"
+ testcase_flags="${testcase_flags} -Wl,-dynamic-linker,`find \${OECORE_TARGET_SYSROOT}/lib/ld-*.so | sort -r -n | head -n1`"
+ ]
+ AC_SUBST([OESDK_TESTCASE_FLAGS], [$testcase_flags])
+)
+
+
+AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([phosphor-snmp.pc])
+AC_OUTPUT
+
+