diff mbox series

[nfs-utils] autoconf: change tirpc to check for a file, not for an include

Message ID 165352679825.11129.7422243280120268766@noble.neil.brown.name (mailing list archive)
State New, archived
Headers show
Series [nfs-utils] autoconf: change tirpc to check for a file, not for an include | expand

Commit Message

NeilBrown May 26, 2022, 12:59 a.m. UTC
Recent autoconf don't like variables in AC_CHECK_INCLUDE so we get a
warning.
In libtirpc.m4 we only need to check for the existence of a file, we
don't need to extra  support for includes, such as defining HAVE_TIRPC_H
or whatever.

So change from AC_CHECK_INCLUDE to AC_CHECK_FILE.

Signed-off-by: NeilBrown <neilb@suse.de>
---
 aclocal/libtirpc.m4 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Steve Dickson June 7, 2022, 8:52 p.m. UTC | #1
On 5/25/22 8:59 PM, NeilBrown wrote:
> 
> Recent autoconf don't like variables in AC_CHECK_INCLUDE so we get a
> warning.
> In libtirpc.m4 we only need to check for the existence of a file, we
> don't need to extra  support for includes, such as defining HAVE_TIRPC_H
> or whatever.
> 
> So change from AC_CHECK_INCLUDE to AC_CHECK_FILE.
> 
> Signed-off-by: NeilBrown <neilb@suse.de>
Committed... (tag: nfs-utils-2-6-2-rc6)

steved.
> ---
>   aclocal/libtirpc.m4 | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
> index f7de5193c177..bddae0226931 100644
> --- a/aclocal/libtirpc.m4
> +++ b/aclocal/libtirpc.m4
> @@ -49,9 +49,9 @@ 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}"])],
> -                          [has_libtirpc="no"])])
> +        [AC_CHECK_FILE([${tirpc_header_dir}/netconfig.h],
> +                       [AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])],
> +                       [has_libtirpc="no"])])
>   
>     dnl Now set $LIBTIRPC accordingly
>     AS_IF([test "$has_libtirpc" = "yes"],
diff mbox series

Patch

diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
index f7de5193c177..bddae0226931 100644
--- a/aclocal/libtirpc.m4
+++ b/aclocal/libtirpc.m4
@@ -49,9 +49,9 @@  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}"])],
-                          [has_libtirpc="no"])])
+        [AC_CHECK_FILE([${tirpc_header_dir}/netconfig.h],
+                       [AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])],
+                       [has_libtirpc="no"])])
 
   dnl Now set $LIBTIRPC accordingly
   AS_IF([test "$has_libtirpc" = "yes"],