From fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 20:02:34 +0200 Subject: Adding upstream version 1.0.18. Signed-off-by: Daniel Baumann --- m4/libcap.m4 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 m4/libcap.m4 (limited to 'm4/libcap.m4') diff --git a/m4/libcap.m4 b/m4/libcap.m4 new file mode 100644 index 0000000..7800336 --- /dev/null +++ b/m4/libcap.m4 @@ -0,0 +1,25 @@ +# +# lldp_CHECK_LIBCAP +# + +AC_DEFUN([lldp_CHECK_LIBCAP], [ + PKG_CHECK_MODULES([libcap], [libcap >= 2], [ + AC_DEFINE([HAVE_LINUX_CAPABILITIES], 1, [Define to indicate support of linux capabilities]) + ], [ + libcap_LIBS=-lcap + libcap_CFLAGS= + _save_libs="$LIBS" + LIBS="$LIBS ${libcap_LIBS}" + AC_MSG_CHECKING([libcap (without pkg-config)]) + AC_TRY_LINK_FUNC([cap_set_proc], [ + AC_DEFINE([HAVE_LINUX_CAPABILITIES], 1, [Define to indicate support of linux capabilities]) + AC_MSG_RESULT(yes) + ], [ + libcap_LIBS= + AC_MSG_RESULT(no) + ]) + LIBS="$_save_libs" + ]) + AC_SUBST([libcap_LIBS]) + AC_SUBST([libcap_CFLAGS]) +]) -- cgit v1.2.3