build: drop autotools support

Change-Id: Ic159830e2ccbc8934f23eb4eff7d15c83a7ffaf0
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/.gitignore b/.gitignore
index cbe1832..6da54be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,124 +1,3 @@
-# Copyright (c) 2016 GitHub, Inc.
-#
-# Permission is hereby granted,  free of charge,  to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to  use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-# source: https://github.com/github/gitignore/blob/master/Python.gitignore
-
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-*$py.class
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-env/
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-*.egg-info/
-.installed.cfg
-*.egg
-
-# PyInstaller
-#  Usually these files are written by a python script from a template
-#  before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*,cover
-.hypothesis/
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-#Ipython Notebook
-.ipynb_checkpoints
-
-*.swo
-*.swp
-
-.deps*
-.libs*
-Makefile
-Makefile.in
-aclocal.m4
-aminclude_static.am
-ar-lib
-*-libtool
-autom4te.cache*
-compile
-config.*
-configure
-depcomp
-install-sh
-ltmain.sh
-missing
-stamp-h1
-*.la
-*.lo
-*.o
-m4/
-mapper
-!mapper/
-setup.py
-mapperx
-.dirstamp
-*.trs
-test-driver
-src/test/associations
-src/test/interfaces_added
-src/test/need_to_introspect
-src/test/well_known
-src/test/name_change
 build*/
 subprojects/*
 !subprojects/*.wrap
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 5c31219..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-if AUTOCONF_CODE_COVERAGE_2019_01_06
-include $(top_srcdir)/aminclude_static.am
-clean-local: code-coverage-clean
-distclean-local: code-coverage-dist-clean
-else
-@CODE_COVERAGE_RULES@
-endif
-
-AM_LIBS = $(CODE_COVERAGE_LIBS)
-AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS) -UNDEBUG $(GTEST_CPPFLAGS)
-AM_CFLAGS = $(CODE_COVERAGE_CFLAGS)
-AM_CXXFLAGS = $(CODE_COVERAGE_CXXFLAGS) \
-	-DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY \
-	-DBOOST_ALL_NO_LIB
-AM_LDFLAGS = $(GMOCK_LIBS) -lgmock_main \
-	$(GTEST_LIBS) $(OESDK_TESTCASE_FLAGS) $(PTHREAD_LIBS) \
-	$(SDBUSPLUS_LIBS)
-
-bin_PROGRAMS = mapper mapperx
-
-mapper_SOURCES = libmapper/app.c
-mapper_LDFLAGS = $(SYSTEMD_LIBS)
-mapper_CFLAGS = $(SYSTEMD_CFLAGS)
-mapper_LDADD = libmapper.la
-
-libmapperdir = ${libdir}
-libmapper_LTLIBRARIES = libmapper.la
-libmapper_la_SOURCES = libmapper/mapper.c
-libmapper_la_LDFLAGS = $(SYSTEMD_LIBS) -version-info 1:0:0 -shared
-libmapper_la_CFLAGS = $(SYSTEMD_CFLAGS) -fvisibility=hidden
-
-mapperx_SOURCES = src/main.cpp src/argument.cpp src/processing.cpp \
-	src/associations.cpp
-mapperx_LDFLAGS = $(SDBUSPLUS_LIBS) -pthread -ltinyxml2
-mapperx_CXXFLAGS = $(SYSTEMD_CFLAGS) -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_ALL_NO_LIB
-
-include_HEADERS = libmapper/mapper.h
-
-SUBDIRS = fail-monitor
-
-check_PROGRAMS =
-XFAIL_TESTS =
-
-# Ignore system headers
-CODE_COVERAGE_IGNORE_PATTERN = '/include/*' '/usr/include/*' '$(includedir)/*'
-
-include src/test/Makefile.am.include
-include libmapper/test/Makefile.am.include
-
-TESTS = $(check_PROGRAMS)
diff --git a/README.md b/README.md
index 44e811c..990523e 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,16 @@
-## To Build
-```
-To build this package, do the following steps:
+## Prerequisites
+Non-OpenBMC build dependencies are:
+ - meson/ninja
+ - boost
+ - libsystemd
+ - systemd
+ - tinyxml2
 
-    1. ./bootstrap.sh
-    2. ./configure ${CONFIGURE_FLAGS}
-    3. make
+## Build
+`meson build && ninja -C build`
 
-To clean the repository run `./bootstrap.sh clean`.
-```
+## Run Unit Tests
+`meson build && ninja -C build test`
+
+## Clean the repository
+`rm -rf build`
diff --git a/bootstrap.sh b/bootstrap.sh
deleted file mode 100755
index 49bf2b0..0000000
--- a/bootstrap.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-AUTOCONF_FILES="Makefile.in aclocal.m4 ar-lib autom4te.cache compile \
-        config.guess config.h.in config.sub configure depcomp install-sh \
-        ltmain.sh missing *libtool test-driver m4"
-
-case $1 in
-    clean)
-        test -f Makefile && make maintainer-clean
-        for file in ${AUTOCONF_FILES}; do
-            find . -name "$file" -print0 | xargs -0 -r rm -rf
-        done
-        exit 0
-        ;;
-esac
-
-autoreconf -i
-# shellcheck disable=SC2016
-echo 'Run "./configure ${CONFIGURE_FLAGS} && make"'
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 7ab3d7a..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,151 +0,0 @@
-# Initialization
-AC_PREREQ([2.69])
-AC_INIT([phosphor-objmgr], [1.0], [https://github.com/openbmc/phosphor-objmgr/issues])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE([subdir-objects -Wall -Wno-portability -Werror foreign dist-xz])
-AM_SILENT_RULES([yes])
-AC_LANG([C++])
-
-# Checks for programs.
-AC_PROG_CC
-AC_PROG_CXX
-AM_PROG_AR
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-AC_PROG_AWK
-
-# Checks for libraries.
-PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
-PKG_CHECK_MODULES([TINYXML2], [tinyxml2])
-PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
-PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
-
-# Checks for header files.
-AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd development package required])])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AX_CXX_COMPILE_STDCXX_17([noext])
-AX_APPEND_COMPILE_FLAGS([-fpic -Wall -Werror], [CFLAGS CXXFLAGS])
-
-# Checks for boost by the headers used.
-AC_CHECK_HEADER(boost/algorithm/string/predicate.hpp, ,[AC_MSG_ERROR([Could not find boost/algorithm/string/predicate.hpp])])
-AC_CHECK_HEADER(boost/container/flat_map.hpp, ,[AC_MSG_ERROR([Could not find boost/container/flat_map.hpp])])
-AC_CHECK_HEADER(boost/container/flat_set.hpp, ,[AC_MSG_ERROR([Could not find boost/container/flat_set.hpp])])
-
-# Checks for library functions.
-LT_INIT([disable-static shared])
-
-# Check/set gtest specific functions.
-AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"])
-AC_SUBST(GTEST_CPPFLAGS)
-
-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])
-)
-
-# Make it possible for users to choose if they want test support
-# explicitly or not at all
-AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],
-                                      [Build test cases]))
-
- # Check/set gtest specific functions
-AS_IF([test "x$enable_tests" != "xno"], [
-    PKG_CHECK_MODULES([GTEST], [gtest], [], [true])
-    PKG_CHECK_MODULES([GMOCK], [gmock], [], [true])
-    AX_PTHREAD
-
-    AX_SAVE_FLAGS_WITH_PREFIX(OLD, [CPPFLAGS])
-    AX_APPEND_COMPILE_FLAGS([$GTEST_CFLAGS], [CPPFLAGS])
-    AC_CHECK_HEADERS([gtest/gtest.h], [
-        AS_IF([test "x$GTEST_CFLAGS" = "x"], [
-            AS_IF([test "x$PTHREAD_CFLAGS" = "x"], [
-                AX_APPEND_COMPILE_FLAGS(["-DGTEST_HAS_PTHREAD=0"], [GTEST_CFLAGS])
-            ], [
-                AX_APPEND_COMPILE_FLAGS(["-DGTEST_HAS_PTHREAD=1"], [GTEST_CFLAGS])
-                AX_APPEND_COMPILE_FLAGS([$PTHREAD_CFLAGS], [GTEST_CFLAGS])
-            ])
-        ])
-    ], [
-        AS_IF([test "x$enable_tests" = "xyes"], [
-            AC_MSG_ERROR([Testing enabled but could not find gtest/gtest.h])
-        ])
-    ])
-    AX_RESTORE_FLAGS_WITH_PREFIX(OLD, [CPPFLAGS])
-
-    AX_SAVE_FLAGS_WITH_PREFIX(OLD, [CPPFLAGS])
-    AX_APPEND_COMPILE_FLAGS([$GMOCK_CFLAGS], [CPPFLAGS])
-    AC_CHECK_HEADERS([gmock/gmock.h], [], [
-        AS_IF([test "x$enable_tests" = "xyes"], [
-            AC_MSG_ERROR([Testing enabled but could not find gmock/gmock.h])
-        ])
-    ])
-    AX_RESTORE_FLAGS_WITH_PREFIX(OLD, [CPPFLAGS])
-
-    AX_SAVE_FLAGS_WITH_PREFIX(OLD, [LDFLAGS])
-    AX_APPEND_COMPILE_FLAGS([$GTEST_LIBS], [LDFLAGS])
-    AC_CHECK_LIB([gtest], [main], [
-        AS_IF([test "x$GTEST_LIBS" = "x"], [
-            AX_APPEND_COMPILE_FLAGS([-lgtest], [GTEST_LIBS])
-        ])
-    ], [
-        AS_IF([test "x$enable_tests" = "xyes"], [
-            AC_MSG_ERROR([Testing enabled but couldn't find gtest libs])
-        ])
-    ])
-    AX_RESTORE_FLAGS_WITH_PREFIX(OLD, [LDFLAGS])
-
-    AX_SAVE_FLAGS_WITH_PREFIX(OLD, [LDFLAGS])
-    AX_APPEND_COMPILE_FLAGS([$GMOCK_LIBS], [LDFLAGS])
-    AC_CHECK_LIB([gmock], [main], [
-        AS_IF([test "x$GMOCK_LIBS" = "x"], [
-            AX_APPEND_COMPILE_FLAGS([-lgmock], [GMOCK_LIBS])
-        ])
-    ], [
-        AS_IF([test "x$enable_tests" = "xyes"], [
-            AC_MSG_ERROR([Testing enabled but couldn't find gmock libs])
-        ])
-    ])
-    AX_RESTORE_FLAGS_WITH_PREFIX(OLD, [LDFLAGS])
-])
-
-# Check for valgrind
-AS_IF([test "x$enable_tests" = "xno"], [enable_valgrind=no])
-m4_foreach([vgtool], [valgrind_tool_list],
-    [AX_VALGRIND_DFLT(vgtool, [off])])
-AX_VALGRIND_DFLT([memcheck], [on])
-AX_VALGRIND_CHECK
-AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
-m4_foreach([vgtool], [valgrind_tool_list],
-    [AM_EXTRA_RECURSIVE_TARGETS([check-valgrind-]vgtool)])
-
-# Code coverage
-AX_CODE_COVERAGE
-
-m4_ifdef([_AX_CODE_COVERAGE_RULES],
-    [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [true])],
-    [AM_CONDITIONAL(AUTOCONF_CODE_COVERAGE_2019_01_06, [false])])
-AX_ADD_AM_MACRO_STATIC([])
-
-# Add defines to config header
-AC_DEFINE([MAPPER_BUSNAME], ["xyz.openbmc_project.ObjectMapper"], [Object mapper bus name])
-AC_DEFINE([MAPPER_INTERFACE], ["xyz.openbmc_project.ObjectMapper"], [Object mapper interface])
-AC_DEFINE([MAPPER_PATH], ["/xyz/openbmc_project/object_mapper"], [Object mapper DBUS path])
-
-# Create configured output
-AC_CONFIG_FILES([Makefile fail-monitor/Makefile])
-AC_OUTPUT
diff --git a/fail-monitor/Makefile.am b/fail-monitor/Makefile.am
deleted file mode 100644
index 6108c0c..0000000
--- a/fail-monitor/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-AM_DEFAULT_SOURCE_EXT = .cpp
-AM_CPPFLAGS = -I$(top_srcdir)
-
-bin_PROGRAMS = \
-	phosphor-unit-failure-monitor
-
-phosphor_unit_failure_monitor_SOURCES = \
-	argument.cpp \
-	main.cpp \
-	monitor.cpp
-
-phosphor_unit_failure_monitor_LDADD = \
-	$(PHOSPHOR_LOGGING_LIBS)
-
-phosphor_unit_failure_monitor_CXXFLAGS = \
-	$(PHOSPHOR_LOGGING_CFLAGS)
diff --git a/libmapper/test/Makefile.am.include b/libmapper/test/Makefile.am.include
deleted file mode 100644
index fdd4849..0000000
--- a/libmapper/test/Makefile.am.include
+++ /dev/null
@@ -1,5 +0,0 @@
-libmapper_test_mapper_SOURCES = %reldir%/mapper.cpp \
-		libmapper/mapper.c libmapper/test/utils.c
-
-check_PROGRAMS += \
-	%reldir%/mapper
diff --git a/src/test/Makefile.am.include b/src/test/Makefile.am.include
deleted file mode 100644
index 0ca04b8..0000000
--- a/src/test/Makefile.am.include
+++ /dev/null
@@ -1,21 +0,0 @@
-src_test_well_known_SOURCES = %reldir%/well_known.cpp src/processing.cpp \
-	src/associations.cpp
-
-src_test_need_to_introspect_SOURCES = %reldir%/need_to_introspect.cpp \
-	src/processing.cpp src/associations.cpp
-
-src_test_associations_SOURCES = %reldir%/associations.cpp \
-    src/associations.cpp
-
-src_test_name_change_SOURCES = %reldir%/name_change.cpp \
-		src/associations.cpp src/processing.cpp
-
-src_test_interfaces_added_SOURCES = %reldir%/interfaces_added.cpp \
-		src/associations.cpp src/processing.cpp
-
-check_PROGRAMS += \
-	%reldir%/well_known \
-	%reldir%/need_to_introspect \
-	%reldir%/associations \
-	%reldir%/name_change \
-	%reldir%/interfaces_added