2022-05-24 02:28:57

by NeilBrown

[permalink] [raw]
Subject: [PATCH nfs-utils] Update autoconfig files to work with v2.71


OpenSUSE recently updated autoconf to v2.71, and nfs-utils now doesn't
build. This patch fixes it. It was mostly achieved with the autoupdate
program.

I haven't updated the AC_PREREQ(), but nor have I confirmed that it
still works with v2.59. It does seem to work with 2.69.

Signed-off-by: NeilBrown <[email protected]>
---
aclocal/bsdsignals.m4 | 5 +--
aclocal/kerberos5.m4 | 2 +-
aclocal/libblkid.m4 | 5 +--
aclocal/libsqlite3.m4 | 5 +--
aclocal/libtirpc.m4 | 6 +--
aclocal/nfs-utils.m4 | 5 +--
aclocal/rpcsec_vers.m4 | 2 +-
configure.ac | 87 ++++++++++++++++--------------------------
8 files changed, 45 insertions(+), 72 deletions(-)

diff --git a/aclocal/bsdsignals.m4 b/aclocal/bsdsignals.m4
index 24572aa721d6..c7b85d066006 100644
--- a/aclocal/bsdsignals.m4
+++ b/aclocal/bsdsignals.m4
@@ -2,7 +2,7 @@ dnl *********** BSD vs. POSIX signal handling **************
AC_DEFUN([AC_BSD_SIGNALS], [
AC_MSG_CHECKING(for BSD signal semantics)
AC_CACHE_VAL(knfsd_cv_bsd_signals,
- [AC_TRY_RUN([
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
@@ -23,8 +23,7 @@ AC_DEFUN([AC_BSD_SIGNALS], [
kill(getpid(), SIGHUP); kill(getpid(), SIGHUP);
return (counter == 2)? 0 : 1;
}
- ], knfsd_cv_bsd_signals=yes, knfsd_cv_bsd_signals=no,
- [
+ ]])],[knfsd_cv_bsd_signals=yes],[knfsd_cv_bsd_signals=no],[
case "$host_os" in
*linux*) knfsd_cv_bsd_signals=no;;
*bsd*) knfsd_cv_bsd_signals=yes;;
diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4
index bf0e88bc57f4..fb9e9b4cdfad 100644
--- a/aclocal/kerberos5.m4
+++ b/aclocal/kerberos5.m4
@@ -6,7 +6,7 @@ dnl The Kerberos gssapi library will be dynamically loaded?
AC_DEFUN([AC_KERBEROS_V5],[
AC_MSG_CHECKING(for Kerberos v5)
AC_ARG_WITH(krb5,
- [AC_HELP_STRING([--with-krb5=DIR], [use Kerberos v5 installation in DIR])],
+ [AS_HELP_STRING([--with-krb5=DIR], [use Kerberos v5 installation in DIR])],
[ case "$withval" in
yes|no)
krb5_with=""
diff --git a/aclocal/libblkid.m4 b/aclocal/libblkid.m4
index 10824e9f58f1..1b8884ce6bcd 100644
--- a/aclocal/libblkid.m4
+++ b/aclocal/libblkid.m4
@@ -5,15 +5,14 @@ AC_DEFUN([AC_BLKID_VERS], [
[
saved_LIBS="$LIBS"
LIBS=-lblkid
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <blkid/blkid.h>
int main()
{
int vers = blkid_get_library_version(0, 0);
return vers >= 140 ? 0 : 1;
}
- ], [libblkid_cv_is_recent=yes], [libblkid_cv_is_recent=no],
- [libblkid_cv_is_recent=unknown])
+ ]])],[libblkid_cv_is_recent=yes],[libblkid_cv_is_recent=no],[libblkid_cv_is_recent=unknown])
LIBS="$saved_LIBS"])
AC_MSG_RESULT($libblkid_cv_is_recent)
])dnl
diff --git a/aclocal/libsqlite3.m4 b/aclocal/libsqlite3.m4
index 8c38993cbba8..16b8c8a1d565 100644
--- a/aclocal/libsqlite3.m4
+++ b/aclocal/libsqlite3.m4
@@ -14,7 +14,7 @@ AC_DEFUN([AC_SQLITE3_VERS], [
[
saved_LIBS="$LIBS"
LIBS=-lsqlite3
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <sqlite3.h>
int main()
@@ -24,8 +24,7 @@ AC_DEFUN([AC_SQLITE3_VERS], [
return vers != SQLITE_VERSION_NUMBER ||
vers < 3003000;
}
- ], [libsqlite3_cv_is_recent=yes], [libsqlite3_cv_is_recent=no],
- [libsqlite3_cv_is_recent=unknown])
+ ]])],[libsqlite3_cv_is_recent=yes],[libsqlite3_cv_is_recent=no],[libsqlite3_cv_is_recent=unknown])
LIBS="$saved_LIBS"])

AC_MSG_RESULT($libsqlite3_cv_is_recent)
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
index 27368ff24ef1..24ba42e6533c 100644
--- a/aclocal/libtirpc.m4
+++ b/aclocal/libtirpc.m4
@@ -37,7 +37,7 @@ dnl
AC_DEFUN([AC_LIBTIRPC_OLD], [

AC_ARG_WITH([tirpcinclude],
- [AC_HELP_STRING([--with-tirpcinclude=DIR],
+ [AS_HELP_STRING([--with-tirpcinclude=DIR],
[use TI-RPC headers in DIR])],
[tirpc_header_dir=$withval],
[tirpc_header_dir=/usr/include/tirpc])
@@ -50,8 +50,8 @@ AC_DEFUN([AC_LIBTIRPC_OLD], [
dnl Also must have the headers installed where we expect
dnl to look for headers; add -I compiler option if found
AS_IF([test "$has_libtirpc" = "yes"],
- [AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
- [AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])],
+ [AC_CHECK_HEADERS([/usr/include/tirpc/netconfig.h],
+ [AC_SUBST([AM_CPPFLAGS], ["-I/usr/include/tirpc"])],
[has_libtirpc="no"])])

dnl Now set $LIBTIRPC accordingly
diff --git a/aclocal/nfs-utils.m4 b/aclocal/nfs-utils.m4
index fae8b95fe533..5f3ab0c2b301 100644
--- a/aclocal/nfs-utils.m4
+++ b/aclocal/nfs-utils.m4
@@ -2,13 +2,12 @@ dnl *********** GNU libc 2 ***************
AC_DEFUN([AC_GNULIBC],[
AC_MSG_CHECKING(for GNU libc2)
AC_CACHE_VAL(knfsd_cv_glibc2,
- [AC_TRY_CPP([
+ [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <features.h>
#if !defined(__GLIBC__)
# error Nope
#endif
- ],
- knfsd_cv_glibc2=yes, knfsd_cv_glibc2=no)])
+ ]])],[knfsd_cv_glibc2=yes],[knfsd_cv_glibc2=no])])
AC_MSG_RESULT($knfsd_cv_glibc2)
if test $knfsd_cv_glibc2 = yes; then
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
diff --git a/aclocal/rpcsec_vers.m4 b/aclocal/rpcsec_vers.m4
index 11d2f18cb241..c3c386587131 100644
--- a/aclocal/rpcsec_vers.m4
+++ b/aclocal/rpcsec_vers.m4
@@ -2,7 +2,7 @@ dnl Checks librpcsec version
AC_DEFUN([AC_RPCSEC_VERSION], [

AC_ARG_WITH([gssglue],
- [AC_HELP_STRING([--with-gssglue], [Use libgssglue for GSS support])])
+ [AS_HELP_STRING([--with-gssglue], [Use libgssglue for GSS support])])
if test x"$with_gssglue" = x"yes"; then
PKG_CHECK_MODULES([GSSGLUE], [libgssglue >= 0.3])
AC_CHECK_LIB([gssglue], [gss_set_allowable_enctypes])
diff --git a/configure.ac b/configure.ac
index 3e1c183b6a07..f7f87e82f695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ AC_CANONICAL_BUILD([])
AC_CANONICAL_HOST([])
AC_CONFIG_MACRO_DIR(aclocal)
AM_INIT_AUTOMAKE
-AC_PREREQ(2.59)
+AC_PREREQ([2.59])
AC_PREFIX_DEFAULT(/usr)
AM_MAINTAINER_MODE
AC_USE_SYSTEM_EXTENSIONS
@@ -14,33 +14,29 @@ dnl *************************************************************
dnl * Define the set of applicable options
dnl *************************************************************
AC_ARG_WITH(release,
- [AC_HELP_STRING([--with-release=XXX], [set release to XXX [1]])],
+ [AS_HELP_STRING([--with-release=XXX],[set release to XXX [1]])],
RELEASE=$withval,
RELEASE=1)
AC_SUBST(RELEASE)
AC_ARG_WITH(statedir,
- [AC_HELP_STRING([--with-statedir=/foo],
- [use state dir /foo @<:@default=/var/lib/[email protected]:>@])],
+ [AS_HELP_STRING([--with-statedir=/foo],[use state dir /foo @<:@default=/var/lib/[email protected]:>@])],
statedir=$withval,
statedir=/var/lib/nfs)
AC_SUBST(statedir)
AC_ARG_WITH(nfsconfig,
- [AC_HELP_STRING([--with-nfsconfig=/config/file],
- [use general config file /config/file @<:@default=/etc/[email protected]:>@])],
+ [AS_HELP_STRING([--with-nfsconfig=/config/file],[use general config file /config/file @<:@default=/etc/[email protected]:>@])],
nfsconfig=$withval,
nfsconfig=/etc/nfs.conf)
AC_SUBST(nfsconfig)
AC_ARG_WITH(statdpath,
- [AC_HELP_STRING([--with-statdpath=/foo],
- [define the statd state dir as /foo instead of the NFS statedir @<:@default=/var/lib/[email protected]:>@])],
+ [AS_HELP_STRING([--with-statdpath=/foo],[define the statd state dir as /foo instead of the NFS statedir @<:@default=/var/lib/[email protected]:>@])],
statdpath=$withval,
statdpath=$statedir
)
AC_SUBST(statdpath)
AC_ARG_WITH(statduser,
- [AC_HELP_STRING([--with-statduser=rpcuser],
- [statd to run under @<:@rpcuser or [email protected]:>@]
- )],
+ [AS_HELP_STRING([--with-statduser=rpcuser],[statd to run under @<:@rpcuser or [email protected]:>@
+ ])],
statduser=$withval,
if test "x$cross_compiling" = "xno"; then
if grep -s '^rpcuser:' /etc/passwd > /dev/null; then
@@ -53,9 +49,8 @@ AC_ARG_WITH(statduser,
fi)
AC_SUBST(statduser)
AC_ARG_WITH(start-statd,
- [AC_HELP_STRING([--with-start-statd=scriptname],
- [When an nfs filesystems is mounted with locking, run this script]
- )],
+ [AS_HELP_STRING([--with-start-statd=scriptname],[When an nfs filesystems is mounted with locking, run this script
+ ])],
startstatd=$withval,
startstatd=/usr/sbin/start-statd
)
@@ -63,8 +58,7 @@ AC_ARG_WITH(start-statd,
AC_DEFINE_UNQUOTED(START_STATD, "$startstatd", [Define this to a script which can start statd on mount])
unitdir=/usr/lib/systemd/system
AC_ARG_WITH(systemd,
- [AC_HELP_STRING([[email protected]<:@[email protected]:>@],
- [install systemd unit files @<:@Default: no, and path defaults to /usr/lib/systemd/system if not [email protected]:>@])],
+ [AS_HELP_STRING([[email protected]<:@[email protected]:>@],[install systemd unit files @<:@Default: no, and path defaults to /usr/lib/systemd/system if not [email protected]:>@])],
if test "$withval" != "no" ; then
use_systemd=1
if test "$withval" != "yes" ; then
@@ -78,8 +72,7 @@ AC_ARG_WITH(systemd,
AC_SUBST(unitdir)

AC_ARG_ENABLE(nfsv4,
- [AC_HELP_STRING([--disable-nfsv4],
- [disable support for NFSv4 @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-nfsv4],[disable support for NFSv4 @<:@[email protected]:>@])],
enable_nfsv4=$enableval,
enable_nfsv4=yes)
if test "$enable_nfsv4" = yes; then
@@ -93,8 +86,7 @@ AC_ARG_ENABLE(nfsv4,
AM_CONDITIONAL(CONFIG_NFSV4, [test "$enable_nfsv4" = "yes"])

AC_ARG_ENABLE(nfsv41,
- [AC_HELP_STRING([--disable-nfsv41],
- [disable support for NFSv41 @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-nfsv41],[disable support for NFSv41 @<:@[email protected]:>@])],
enable_nfsv41=$enableval,
enable_nfsv41=yes)
if test "$enable_nfsv41" = yes; then
@@ -111,8 +103,7 @@ AC_ARG_ENABLE(nfsv41,
AM_CONDITIONAL(CONFIG_NFSV41, [test "$enable_nfsv41" = "yes"])

AC_ARG_ENABLE(gss,
- [AC_HELP_STRING([--disable-gss],
- [disable client support for rpcsec_gss @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-gss],[disable client support for rpcsec_gss @<:@[email protected]:>@])],
enable_gss=$enableval,
enable_gss=yes)
if test "$enable_gss" = yes; then
@@ -126,8 +117,7 @@ AC_ARG_ENABLE(gss,
AM_CONDITIONAL(CONFIG_GSS, [test "$enable_gss" = "yes"])

AC_ARG_ENABLE(svcgss,
- [AC_HELP_STRING([--enable-svcgss],
- [enable building svcgssd for rpcsec_gss server support @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--enable-svcgss],[enable building svcgssd for rpcsec_gss server support @<:@[email protected]:>@])],
enable_svcgss=$enableval,
enable_svcgss=no)
if test "$enable_gss" = yes -a "$enable_svcgss" = yes; then
@@ -141,12 +131,12 @@ AC_ARG_ENABLE(svcgss,
AM_CONDITIONAL(CONFIG_SVCGSS, [test "$enable_svcgss" = "yes"])

AC_ARG_ENABLE(kprefix,
- [AC_HELP_STRING([--enable-kprefix], [install progs as rpc.knfsd etc])],
+ [AS_HELP_STRING([--enable-kprefix],[install progs as rpc.knfsd etc])],
test "$enableval" = "yes" && kprefix=k,
kprefix=)
AC_SUBST(kprefix)
AC_ARG_WITH(rpcgen,
- [AC_HELP_STRING([--with-rpcgen=internal], [use internal rpcgen instead of system one])],
+ [AS_HELP_STRING([--with-rpcgen=internal],[use internal rpcgen instead of system one])],
rpcgen_path=$withval,
rpcgen_path=yes )
rpcgen_cflags=-Werror=strict-prototypes
@@ -166,21 +156,18 @@ AC_ARG_WITH(rpcgen,
AC_SUBST(RPCGEN_PATH)
AM_CONDITIONAL(CONFIG_RPCGEN, [test "$RPCGEN_PATH" = "internal"])
AC_ARG_ENABLE(uuid,
- [AC_HELP_STRING([--disable-uuid],
- [Exclude uuid support to avoid buggy libblkid. @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-uuid],[Exclude uuid support to avoid buggy libblkid. @<:@[email protected]:>@])],
if test "$enableval" = "yes" ; then choose_blkid=yes; else choose_blkid=no; fi,
choose_blkid=default)
AC_ARG_ENABLE(mount,
- [AC_HELP_STRING([--disable-mount],
- [Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-mount],[Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@[email protected]:>@])],
enable_mount=$enableval,
enable_mount=yes)
AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"])

if test "$enable_mount" = yes; then
AC_ARG_ENABLE(libmount-mount,
- [AC_HELP_STRING([--enable-libmount-mount],
- [Link mount.nfs with libmount @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--enable-libmount-mount],[Link mount.nfs with libmount @<:@[email protected]:>@])],
enable_libmount=$enableval,
enable_libmount=no)
else
@@ -188,14 +175,12 @@ else
fi

AC_ARG_ENABLE(sbin-override,
- [AC_HELP_STRING([--disable-sbin-override],
- [Don't force nfsdcltrack and mount helpers into /sbin: always honour --sbindir])],
+ [AS_HELP_STRING([--disable-sbin-override],[Don't force nfsdcltrack and mount helpers into /sbin: always honour --sbindir])],
enable_sbin_override=$enableval,
enable_sbin_override=yes)
AM_CONDITIONAL(CONFIG_SBIN_OVERRIDE, [test "$enable_sbin_override" = "yes"])
AC_ARG_ENABLE(junction,
- [AC_HELP_STRING([--enable-junction],
- [enable support for NFS junctions @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--enable-junction],[enable support for NFS junctions @<:@[email protected]:>@])],
enable_junction=$enableval,
enable_junction=no)
if test "$enable_junction" = yes; then
@@ -207,13 +192,11 @@ AC_ARG_ENABLE(junction,
AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ])

AC_ARG_ENABLE(tirpc,
- [AC_HELP_STRING([--disable-tirpc],
- [disable use of TI-RPC library @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-tirpc],[disable use of TI-RPC library @<:@[email protected]:>@])],
enable_tirpc=$enableval,
enable_tirpc=yes)
AC_ARG_ENABLE(ipv6,
- [AC_HELP_STRING([--disable-ipv6],
- [disable support for IPv6 @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-ipv6],[disable support for IPv6 @<:@[email protected]:>@])],
enable_ipv6=$enableval,
enable_ipv6=yes)
if test "$enable_ipv6" = yes; then
@@ -226,8 +209,7 @@ AC_ARG_ENABLE(ipv6,

if test "$enable_mount" = yes; then
AC_ARG_ENABLE(mountconfig,
- [AC_HELP_STRING([--disable-mountconfig],
- [disable mount to use a configuration file @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-mountconfig],[disable mount to use a configuration file @<:@[email protected]:>@])],
enable_mountconfig=$enableval,
enable_mountconfig=yes)
if test "$enable_mountconfig" = no; then
@@ -236,9 +218,8 @@ if test "$enable_mount" = yes; then
AC_DEFINE(MOUNT_CONFIG, 1,
[Define this if you want mount to read a configuration file])
AC_ARG_WITH(mountfile,
- [AC_HELP_STRING([--with-mountfile=filename],
- [Using filename as the NFS mount options file [/etc/nfsmounts.conf]]
- )],
+ [AS_HELP_STRING([--with-mountfile=filename],[Using filename as the NFS mount options file [/etc/nfsmounts.conf]
+ ])],
mountfile=$withval,
mountfile=/etc/nfsmount.conf)
AC_SUBST(mountfile)
@@ -252,20 +233,17 @@ else
fi

AC_ARG_ENABLE(nfsdcld,
- [AC_HELP_STRING([--disable-nfsdcld],
- [disable NFSv4 clientid tracking daemon @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-nfsdcld],[disable NFSv4 clientid tracking daemon @<:@[email protected]:>@])],
enable_nfsdcld=$enableval,
enable_nfsdcld="yes")

AC_ARG_ENABLE(nfsdcltrack,
- [AC_HELP_STRING([--disable-nfsdcltrack],
- [disable NFSv4 clientid tracking programs @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--disable-nfsdcltrack],[disable NFSv4 clientid tracking programs @<:@[email protected]:>@])],
enable_nfsdcltrack=$enableval,
enable_nfsdcltrack="yes")

AC_ARG_ENABLE(nfsv4server,
- [AC_HELP_STRING([--enable-nfsv4server],
- [enable support for NFSv4 only server @<:@[email protected]:>@])],
+ [AS_HELP_STRING([--enable-nfsv4server],[enable support for NFSv4 only server @<:@[email protected]:>@])],
enable_nfsv4server=$enableval,
enable_nfsv4server="no")
if test "$enable_nfsv4server" = yes; then
@@ -299,7 +277,7 @@ AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
-AC_PROG_LIBTOOL
+LT_INIT
AM_PROG_CC_C_O

if test "x$cross_compiling" = "xno"; then
@@ -313,7 +291,6 @@ AC_SUBST(CC_FOR_BUILD)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(LD, ld)

-AC_HEADER_STDC([])
AC_GNULIBC
AC_BSD_SIGNALS

@@ -553,7 +530,7 @@ AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
-AC_HEADER_TIME
+
AC_STRUCT_TM
AC_CHECK_TYPES([struct file_handle], [], [], [[
#define _GNU_SOURCE
@@ -579,7 +556,7 @@ AC_HEADER_MAJOR
AC_FUNC_MEMCMP
#AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
-AC_TYPE_SIGNAL
+
AC_FUNC_STAT
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \
--
2.36.1



2022-05-27 06:49:55

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH nfs-utils] Update autoconfig files to work with v2.71

On Tue, 24 May 2022, NeilBrown wrote:
> OpenSUSE recently updated autoconf to v2.71, and nfs-utils now doesn't
> build. This patch fixes it. It was mostly achieved with the autoupdate
> program.
>
> I haven't updated the AC_PREREQ(), but nor have I confirmed that it
> still works with v2.59. It does seem to work with 2.69.

Actually, please don't apply this as-is.
I remembered that I left....
> @@ -50,8 +50,8 @@ AC_DEFUN([AC_LIBTIRPC_OLD], [
> dnl Also must have the headers installed where we expect
> dnl to look for headers; add -I compiler option if found
> AS_IF([test "$has_libtirpc" = "yes"],
> - [AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
> - [AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])],
> + [AC_CHECK_HEADERS([/usr/include/tirpc/netconfig.h],
> + [AC_SUBST([AM_CPPFLAGS], ["-I/usr/include/tirpc"])],
> [has_libtirpc="no"])])
>

this in there - it ignores the config request an always uses
/usr/include/tirpc. I need to work out how to do the right thing
without getting warnings.

Thanks,
NeilBrown