Skip to content

Commit

Permalink
build: modernize autotools stuff
Browse files Browse the repository at this point in the history
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
  • Loading branch information
garlick committed Jan 24, 2024
1 parent ab6d03d commit 72337a0
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config/ac_genders.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion config/ac_httppower.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion config/ac_pkgconfig.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion config/ac_redfishpower.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion config/ac_runas.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)
;;
Expand Down
2 changes: 1 addition & 1 deletion config/ac_snmppower.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
2 changes: 1 addition & 1 deletion config/ac_wrap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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])

##
Expand All @@ -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")

##
Expand All @@ -56,7 +57,6 @@ AC_CHECK_FILES(/dev/ptc)
##
# Checks for header files.
##
AC_HEADER_STDC
AC_CHECK_HEADERS( \
getopt.h \
poll.h \
Expand Down

0 comments on commit 72337a0

Please sign in to comment.