Skip to content

Commit

Permalink
Fix AC_CHECK_HEADERS usage for autoconf 2.69
Browse files Browse the repository at this point in the history
The fourth argument of AC_CHECK_HEADERS (used to indicate the set of
includes), is mandantory for autoconf 2.69 and earlier to force modern
behavior of the macro.

The semantics of the macro changed from using a preprocessor-only check to
a compiler check, and the fourth argument determines the use of: classic
behavior (for compatibility), a transitional check of both and warnings
(returning retro-compatible but potentially inconsistent results), or the
use of the modern compiler-based test only. Specifying this argument also
suppresses a warning about the topic.

Fixes: 4ada39f ("build: fix tirpc usage xinetd-org#27")
Ref: openSUSE#40
Signed-off-by: Ismael Luceno <[email protected]>
  • Loading branch information
ismaell committed Sep 12, 2022
1 parent 4ada39f commit a50dc22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ AS_IF([test x"$with_rpc" != "xno"], [
have_rpc=maybe
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $RPC_CFLAGS"
AC_CHECK_HEADERS([rpc/rpc.h],, [have_rpc=no])
dnl XXX The fourth argument to AC_CHECK_HEADERS is required for autoconf
dnl 2.69 to enable modern (compiler-based) behavior; don't remove.
AC_CHECK_HEADERS([rpc/rpc.h],, [have_rpc=no], [/**/])
dnl FIXME do a linking test
AS_IF([test x"$have_rpc" = xmaybe], [
dnl XXX is this header really optional?
AC_CHECK_HEADERS([rpc/rpcent.h])
AC_CHECK_HEADERS([rpc/rpcent.h],,, [/**/])
have_rpc=yes
])
CPPFLAGS=$save_CPPFLAGS
Expand Down

0 comments on commit a50dc22

Please sign in to comment.