build tool: remove autotools
Meson is fully working now, remove autotools completely. See
[1] https://gerrit.openbmc.org/c/openbmc/openbmc/+/56842
Tested: see testing performed in the recipe change.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I679e085cbc1bc59421781fe54e33b1813ef166a1
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 7e6df6f..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,49 +0,0 @@
-bin_PROGRAMS = phosphor-user-manager
-
-noinst_HEADERS = user_mgr.hpp users.hpp
-
-phosphor_user_manager_SOURCES = \
- mainapp.cpp \
- user_mgr.cpp \
- users.cpp
-
-phosphor_user_manager_LDFLAGS = $(SDBUSPLUS_LIBS) \
- $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
- $(PHOSPHOR_LOGGING_LIBS) \
- $(BOOST_CPPFLAGS) \
- -lcrypt \
- -lstdc++fs
-
-phosphor_user_manager_CXXFLAGS = $(SYSTEMD_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
- $(BOOST_CPPFLAGS) \
- -DBOOST_ALL_NO_LIB \
- -DBOOST_SYSTEM_NO_DEPRECATED \
- -DBOOST_ERROR_CODE_HEADER_ONLY
-
-certmgrenvdir=$(datadir)/phosphor-certificate-manager
-dbuspolicy_DATA = phosphor-nslcd-cert-config.conf
-certmgrenv_DATA = nslcd
-SYSTEM_UNIT_ALIASES = \
- ../phosphor-certificate-manager@.service multi-user.target.wants/phosphor-certificate-manager@nslcd.service
-
-SUBDIRS = . phosphor-ldap-config test
-
-install-aliases-hook:
- set -- $(SYSTEM_UNIT_ALIASES) && \
- dir=$(systemdsystemunitdir) && $(install-aliases)
-
-define install-aliases
- while [ -n "$$1" ]; do \
- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
- rm -f $(DESTDIR)$$dir/$$2 && \
- $(LN_S) $$1 $(DESTDIR)$$dir/$$2 && \
- shift 2 || exit $$?; \
- done
-endef
-
-INSTALL_DATA_HOOKS = \
- install-aliases-hook
-
-install-data-hook: $(INSTALL_DATA_HOOKS)
diff --git a/bootstrap.sh b/bootstrap.sh
deleted file mode 100755
index 9fdf674..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"
-
-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 bd57c43..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,136 +0,0 @@
-# Initialization
-AC_PREREQ([2.69])
-AC_INIT([phosphor-user-manager], [1.0], [https://github.com/openbmc/phosphor-user-manager/issues])
-AC_LANG([C++])
-AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror foreign dist-xz])
-AM_SILENT_RULES([yes])
-
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-
-# Checks for libraries.
-PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
-PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [phosphor-dbus-interfaces])
-PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
-
-AC_ARG_VAR(USER_MANAGER_BUSNAME, [The Dbus busname to own])
-AS_IF([test "x$USER_MANAGER_BUSNAME" == "x"], [USER_MANAGER_BUSNAME="xyz.openbmc_project.User.Manager"])
-AC_DEFINE_UNQUOTED([USER_MANAGER_BUSNAME], ["$USER_MANAGER_BUSNAME"], [The DBus busname to own])
-
-AC_ARG_VAR(CLASS_VERSION, [Class version to register with Cereal])
-AS_IF([test "x$CLASS_VERSION" == "x"], [CLASS_VERSION=1])
-AC_DEFINE_UNQUOTED([CLASS_VERSION], [$CLASS_VERSION], [Class version to register with Cereal])
-
-# Default crypt algorithm to choose if one not found in shadow file
-# Per crypt(3), 1 is for MD5
-AC_ARG_VAR(DEFAULT_CRYPT_ALGO, [The default crypt algorithm if one not found in shadow])
-AS_IF([test "x$DEFAULT_CRYPT_ALGO" == "x"], [DEFAULT_CRYPT_ALGO="1"])
-AC_DEFINE_UNQUOTED([DEFAULT_CRYPT_ALGO], ["$DEFAULT_CRYPT_ALGO"], [The default crypt algorithm if one not found in shadow])
-
-# Check/set gtest specific functions.
-AX_PTHREAD([GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=1"],[GTEST_CPPFLAGS="-DGTEST_HAS_PTHREAD=0"])
-AC_SUBST(GTEST_CPPFLAGS)
-
-# Test cases require SDK so only build if we're told to (and SDK is available)
-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_ARG_WITH([systemdsystemunitdir],
- [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],
- [],
- [with_systemdsystemunitdir=auto]
-)
-AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"],
- [def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
- AS_IF([test "x$def_systemdsystemunitdir" = "x"],
- [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
- [AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])]
- )
- with_systemdsystemunitdir=no],
- [with_systemdsystemunitdir="$def_systemdsystemunitdir"]
- )]
-)
-AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
- [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]
-)
-
-AC_ARG_WITH([dbuspolicydir],
- AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
- [],
- [with_dbuspolicydir=${datadir}/dbus-1/system.d])
-AS_IF([test "x$with_dbuspolicydir" != "xno"],
- [AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])]
-)
-
-AC_ARG_VAR(LDAP_CONFIG_FILE, [Path of LDAP configuration file])
-AS_IF([test "x$LDAP_CONFIG_FILE" == "x"], [LDAP_CONFIG_FILE="/etc/nslcd.conf"])
-AC_DEFINE_UNQUOTED([LDAP_CONFIG_FILE], ["$LDAP_CONFIG_FILE"], [Path of LDAP configuration file])
-
-AC_ARG_VAR(TLS_CACERT_PATH, [Path of LDAP server's CA certificate])
-AS_IF([test "x$TLS_CACERT_PATH" == "x"], [TLS_CACERT_PATH="/etc/ssl/certs/authority"])
-AC_DEFINE_UNQUOTED([TLS_CACERT_PATH], ["$TLS_CACERT_PATH"], [Path of LDAP server's CA certificate])
-
-AC_ARG_VAR(TLS_CERT_FILE, [Path of LDAP's client certificate])
-AS_IF([test "x$TLS_CERT_FILE" == "x"], [TLS_CERT_FILE="/etc/nslcd/certs/cert.pem"])
-AC_DEFINE_UNQUOTED([TLS_CERT_FILE], ["$TLS_CERT_FILE"], [Path of LDAP's client certificate])
-
-AC_ARG_VAR(LDAP_CONFIG_ROOT, [LDAP configuration root])
-AS_IF([test "x$LDAP_CONFIG_ROOT" == "x"], [LDAP_CONFIG_ROOT="/xyz/openbmc_project/user/ldap"])
-AC_DEFINE_UNQUOTED([LDAP_CONFIG_ROOT], ["$LDAP_CONFIG_ROOT"], [LDAP configuration root])
-
-AC_ARG_VAR(LDAP_CONFIG_DBUS_OBJ_PATH, [D-Bus path of LDAP config object])
-AS_IF([test "x$LDAP_CONFIG_DBUS_OBJ_PATH" == "x"], [LDAP_CONFIG_DBUS_OBJ_PATH="/xyz/openbmc_project/user/ldap/config"])
-AC_DEFINE_UNQUOTED([LDAP_CONFIG_DBUS_OBJ_PATH], ["$LDAP_CONFIG_DBUS_OBJ_PATH"], [D-Bus path of LDAP config object])
-
-AC_ARG_VAR(LDAP_CONFIG_BUSNAME, [D-Bus busname of LDAP config service])
-AS_IF([test "x$LDAP_CONFIG_BUSNAME" == "x"], [LDAP_CONFIG_BUSNAME="xyz.openbmc_project.Ldap.Config"])
-AC_DEFINE_UNQUOTED([LDAP_CONFIG_BUSNAME], ["$LDAP_CONFIG_BUSNAME"], [D-Bus busname of LDAP config service])
-
-AC_ARG_VAR(LDAP_CONF_PERSIST_PATH, [directory path to persist LDAP enabled property.])
-AS_IF([test "x$LDAP_CONF_PERSIST_PATH" == "x"], \
- [LDAP_CONF_PERSIST_PATH="/var/lib/phosphor-ldap-conf"])
-AC_DEFINE_UNQUOTED([LDAP_CONF_PERSIST_PATH], ["$LDAP_CONF_PERSIST_PATH"], \
- [path of directory having persisted LDAP configuration enabled property.])
-
-AC_ARG_ENABLE([root_user_mgmt],
- AS_HELP_STRING([--disable-root_user_mgmt], [Disables managing root user. [default=enable]])
-)
-AS_IF([test "x$enable_root_user_mgmt" != "xno"],
- AC_MSG_NOTICE([Enable managing root user])
- [cpp_flags="-DENABLE_ROOT_USER_MGMT"]
- AC_SUBST([CPPFLAGS], [$cpp_flags]),
- AC_MSG_WARN([Disable managing root user])
-)
-
-AC_DEFINE(SYSTEMD_BUSNAME, "org.freedesktop.systemd1", [systemd busname.])
-AC_DEFINE(SYSTEMD_PATH, "/org/freedesktop/systemd1", [systemd path.])
-AC_DEFINE(SYSTEMD_INTERFACE, "org.freedesktop.systemd1.Manager", [systemd interface.])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AX_CXX_COMPILE_STDCXX([20],[noext])
-AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
-
-# For libtools
-LT_INIT
-
-# Create configured output
-AC_CONFIG_FILES([Makefile test/Makefile phosphor-ldap-config/Makefile])
-AC_OUTPUT
diff --git a/phosphor-ldap-config/Makefile.am b/phosphor-ldap-config/Makefile.am
deleted file mode 100644
index ba8980b..0000000
--- a/phosphor-ldap-config/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-bin_PROGRAMS = phosphor-ldap-conf
-
-noinst_HEADERS = ldap_config.hpp \
- ldap_config_mgr.hpp \
- ldap_mapper_entry.hpp \
- ldap_mapper_serialize.hpp \
- utils.hpp
-
-phosphor_ldap_conf_SOURCES = \
- main.cpp \
- utils.cpp \
- ldap_config.cpp \
- ldap_config_mgr.cpp \
- ldap_mapper_entry.cpp \
- ldap_mapper_serialize.cpp
-
-phosphor_ldap_conf_LDFLAGS = $(SDBUSPLUS_LIBS) \
- $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
- $(PHOSPHOR_LOGGING_LIBS) \
- -lldap
-
-phosphor_ldap_conf_CXXFLAGS = $(SYSTEMD_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
- -flto
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index 52ad53a..0000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-AM_CPPFLAGS = -I$(top_srcdir)
-
-# Run all 'check' test programs
-TESTS = $(check_PROGRAMS)
-
-cppflags = -Igtest \
- $(GTEST_CPPFLAGS) \
- $(AM_CPPFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
- $(SDBUSPLUS_CFLAGS)
-
-cxxflags = $(PTHREAD_CFLAGS)
-
-ldflags = -lgtest_main \
- -lgtest \
- $(PTHREAD_LIBS) \
- $(OESDK_TESTCASE_FLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_LIBS) \
- $(PHOSPHOR_LOGGING_LIBS) \
- $(SDBUSPLUS_LIBS) \
- -lcrypt
-
-check_PROGRAMS = ldap_config_test
-ldap_config_test_CPPFLAGS = $(cppflags)
-ldap_config_test_CXXFLAGS = $(cxxflags)
-ldap_config_test_LDFLAGS = $(ldflags) \
- -lldap \
- -lgmock
-ldap_config_test_SOURCES = ldap_config_test.cpp utils_test.cpp
-ldap_config_test_LDADD = $(top_builddir)/phosphor-ldap-config/ldap_config.o \
- $(top_builddir)/phosphor-ldap-config/utils.o \
- $(top_builddir)/phosphor-ldap-config/ldap_config_mgr.o \
- $(top_builddir)/phosphor-ldap-config/ldap_mapper_entry.o \
- $(top_builddir)/phosphor-ldap-config/ldap_mapper_serialize.o
-
-check_PROGRAMS += user_mgr_test
-user_mgr_test_CPPFLAGS = $(cppflags)
-user_mgr_test_CXXFLAGS = $(cxxflags) $(GTEST_CPPFLAGS)
-user_mgr_test_LDFLAGS = $(ldflags) $(GTEST_LIBS) $(GMOCK_LIBS) -lgmock
-user_mgr_test_SOURCES = user_mgr_test.cpp
-user_mgr_test_LDADD = $(top_builddir)/user_mgr.o \
- $(top_builddir)/users.o