autoconf: Retire AC_LBL_C_INLINE. [skip appveyor]

In 2002 this macro implemented a workaround for HP C compiler because
the latter did not work with the implementation of AC_C_INLINE in
Autoconf 2.13 (see commit b1263c6).  Since then the required kind of
inline very likely became available in every supported compiler of every
supported OS, but just in case there is still an exception, use
AC_C_INLINE from Autoconf 2.69 (or later) and trust it to work right.
In other words, if the original problem still exists, this will have to
be proven.

This squelches one more warning from Autoconf 2.71:

configure.ac:32: warning: The macro `AC_TRY_COMPILE' is obsolete.
This commit is contained in:
Denis Ovsienko 2023-02-08 23:05:58 +00:00
parent 29d035a0fd
commit a5fe56ffd0
2 changed files with 1 additions and 52 deletions

51
aclocal.m4 vendored
View File

@ -370,57 +370,6 @@ AC_DEFUN(AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT,
AC_SUBST(MKDEP)
])
#
# Try compiling a sample of the type of code that appears in
# gencode.c with "inline", "__inline__", and "__inline".
#
# Autoconf's AC_C_INLINE, at least in autoconf 2.13, isn't good enough,
# as it just tests whether a function returning "int" can be inlined;
# at least some versions of HP's C compiler can inline that, but can't
# inline a function that returns a struct pointer.
#
# Make sure we use the V_CCOPT flags, because some of those might
# disable inlining.
#
AC_DEFUN(AC_LBL_C_INLINE,
[AC_MSG_CHECKING(for inline)
save_CFLAGS="$CFLAGS"
CFLAGS="$V_CCOPT"
AC_CACHE_VAL(ac_cv_lbl_inline, [
ac_cv_lbl_inline=""
ac_lbl_cc_inline=no
for ac_lbl_inline in inline __inline__ __inline
do
AC_TRY_COMPILE(
[#define inline $ac_lbl_inline
static inline struct iltest *foo(void);
struct iltest {
int iltest1;
int iltest2;
};
static inline struct iltest *
foo()
{
static struct iltest xxx;
return &xxx;
}],,ac_lbl_cc_inline=yes,)
if test "$ac_lbl_cc_inline" = yes ; then
break;
fi
done
if test "$ac_lbl_cc_inline" = yes ; then
ac_cv_lbl_inline=$ac_lbl_inline
fi])
CFLAGS="$save_CFLAGS"
if test ! -z "$ac_cv_lbl_inline" ; then
AC_MSG_RESULT($ac_cv_lbl_inline)
else
AC_MSG_RESULT(no)
fi
AC_DEFINE_UNQUOTED(inline, $ac_cv_lbl_inline, [Define as token for inline if inlining supported])])
dnl
dnl Require libpcap
dnl Look for libpcap in directories under ..; those are local versions.

View File

@ -29,7 +29,7 @@ if test "$ac_cv_prog_cc_c99" = "no"; then
AC_MSG_WARN([The C compiler does not support C99; there may be compiler errors])
fi
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
AC_LBL_C_INLINE
AC_C_INLINE
AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h)