From 72337a002598508b643854d1373e724640560b51 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 24 Jan 2024 14:13:28 -0800 Subject: [PATCH] build: modernize autotools stuff Problem: autogen.sh emits a bunch of warnings when run on Ubuntu 22.04 LTS with autoconf 2.71. Update a few things to address the warnings. Fixes #75 --- config/ac_genders.m4 | 2 +- config/ac_httppower.m4 | 2 +- config/ac_pkgconfig.m4 | 2 +- config/ac_redfishpower.m4 | 2 +- config/ac_runas.m4 | 2 +- config/ac_snmppower.m4 | 2 +- config/ac_wrap.m4 | 2 +- configure.ac | 10 +++++----- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/ac_genders.m4 b/config/ac_genders.m4 index b691c029..d58cd428 100644 --- a/config/ac_genders.m4 +++ b/config/ac_genders.m4 @@ -7,7 +7,7 @@ AC_DEFUN([AC_GENDERS], [ AC_ARG_WITH([genders], - AC_HELP_STRING([--with-genders], [Build genders support for client])) + AS_HELP_STRING([--with-genders], [Build genders support for client])) AS_IF([test "x$with_genders" = "xyes"], [ AC_CHECK_HEADERS([genders.h]) X_AC_CHECK_COND_LIB([genders], [genders_handle_create]) diff --git a/config/ac_httppower.m4 b/config/ac_httppower.m4 index d94198b7..02bcb888 100644 --- a/config/ac_httppower.m4 +++ b/config/ac_httppower.m4 @@ -8,7 +8,7 @@ AC_DEFUN([AC_HTTPPOWER], [ AC_ARG_WITH([httppower], - AC_HELP_STRING([--with-httppower], [Build httppower executable])) + AS_HELP_STRING([--with-httppower], [Build httppower executable])) AS_IF([test "x$with_httppower" = "xyes"], [ AC_CHECK_HEADERS([curl/curl.h]) X_AC_CHECK_COND_LIB([curl], [curl_easy_setopt]) diff --git a/config/ac_pkgconfig.m4 b/config/ac_pkgconfig.m4 index a18523b7..a50a2454 100644 --- a/config/ac_pkgconfig.m4 +++ b/config/ac_pkgconfig.m4 @@ -5,7 +5,7 @@ AC_DEFUN([AC_PKGCONFIG], pkgconfigdir='${libdir}/pkgconfig' AC_MSG_CHECKING(whether to install pkg-config *.pc files) AC_ARG_WITH(pkgconfig-dir, - AC_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), + AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), [ case "${withval}" in yes|auto) diff --git a/config/ac_redfishpower.m4 b/config/ac_redfishpower.m4 index e9928151..c622928b 100644 --- a/config/ac_redfishpower.m4 +++ b/config/ac_redfishpower.m4 @@ -5,7 +5,7 @@ AC_DEFUN([AC_REDFISHPOWER], [ AC_ARG_WITH([redfishpower], - AC_HELP_STRING([--with-redfishpower], [Build redfishpower executable])) + AS_HELP_STRING([--with-redfishpower], [Build redfishpower executable])) AS_IF([test "x$with_redfishpower" = "xyes"], [ AC_CHECK_HEADERS([curl/curl.h]) X_AC_CHECK_COND_LIB([curl], [curl_multi_perform]) diff --git a/config/ac_runas.m4 b/config/ac_runas.m4 index a6618b7a..f83680b3 100644 --- a/config/ac_runas.m4 +++ b/config/ac_runas.m4 @@ -3,7 +3,7 @@ AC_DEFUN([AC_RUNAS], RUN_AS_USER="daemon" AC_MSG_CHECKING(user to run as) AC_ARG_WITH(user, - AC_HELP_STRING([--with-user=username], [user for powerman daemon (daemon)]), + AS_HELP_STRING([--with-user=username], [user for powerman daemon (daemon)]), [ case "${withval}" in yes|no) ;; diff --git a/config/ac_snmppower.m4 b/config/ac_snmppower.m4 index 90b6d06a..64b688b9 100644 --- a/config/ac_snmppower.m4 +++ b/config/ac_snmppower.m4 @@ -8,7 +8,7 @@ AC_DEFUN([AC_SNMPPOWER], [ AC_ARG_WITH([snmppower], - AC_HELP_STRING([--with-snmppower], [Build snmppower executable])) + AS_HELP_STRING([--with-snmppower], [Build snmppower executable])) AS_IF([test "x$with_snmppower" = "xyes"], [ AC_CHECK_HEADERS([net-snmp/net-snmp-config.h]) X_AC_CHECK_COND_LIB([netsnmp], [init_snmp]) diff --git a/config/ac_wrap.m4 b/config/ac_wrap.m4 index a8bd69b9..9a30b2cb 100644 --- a/config/ac_wrap.m4 +++ b/config/ac_wrap.m4 @@ -8,7 +8,7 @@ AC_DEFUN([AC_WRAP], [ AC_ARG_WITH([tcp-wrappers], - AC_HELP_STRING([--with-tcp-wrappers], [Build with tcp wrappers support])) + AS_HELP_STRING([--with-tcp-wrappers], [Build with tcp wrappers support])) AS_IF([test "x$with_tcp_wrappers" = "xyes"], [ AC_CHECK_HEADERS([tcpd.h]) X_AC_CHECK_COND_LIB([wrap], [hosts_ctl]) diff --git a/configure.ac b/configure.ac index add2a999..74c65d33 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,9 @@ AC_INIT([powerman], AC_CONFIG_AUX_DIR([config]) AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_SRCDIR([NEWS]) -AC_CANONICAL_SYSTEM +AC_CANONICAL_TARGET + +LT_INIT ## # If runstatedir not explicitly set on command line, use '/run' as default @@ -22,7 +24,7 @@ X_AC_EXPAND_INSTALL_DIRS ## AM_INIT_AUTOMAKE([subdir-objects foreign]) AM_SILENT_RULES([yes]) -AM_CONFIG_HEADER([config/config.h]) +AC_CONFIG_HEADERS([config/config.h]) AM_MAINTAINER_MODE([enable]) ## @@ -42,9 +44,8 @@ AC_SUBST([WARNING_CFLAGS]) AC_PROG_LN_S AC_PROG_MAKE_SET -AM_PROG_LEX +AC_PROG_LEX([noyywrap]) AC_PROG_YACC -AC_PROG_LIBTOOL AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes") ## @@ -56,7 +57,6 @@ AC_CHECK_FILES(/dev/ptc) ## # Checks for header files. ## -AC_HEADER_STDC AC_CHECK_HEADERS( \ getopt.h \ poll.h \