From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v2 2/7] m4: Fix libacl detection on 32-bit cross build
Date: Mon, 9 Oct 2017 17:29:50 +0200 [thread overview]
Message-ID: <20171009152950.GE25633@rei.lan> (raw)
In-Reply-To: <20171009110101.3329-3-pvorel@suse.cz>
Hi!
> configure.ac | 1 +
> m4/ltp-acl.m4 | 7 +++----
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 0bae6ce3f..e9c61ef78 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -41,6 +41,7 @@ AC_CHECK_HEADERS([ \
> linux/mempolicy.h \
> linux/module.h \
> linux/netlink.h \
> + sys/acl.h \
> sys/epoll.h \
> sys/inotify.h \
> sys/fanotify.h \
> diff --git a/m4/ltp-acl.m4 b/m4/ltp-acl.m4
> index 6b739346b..789fabe0b 100644
> --- a/m4/ltp-acl.m4
> +++ b/m4/ltp-acl.m4
> @@ -23,8 +23,7 @@ dnl LTP_CHECK_ACL_SUPPORT
> dnl ----------------------------
> dnl
> AC_DEFUN([LTP_CHECK_ACL_SUPPORT],[
> -AH_TEMPLATE(HAVE_LIBACL,
> -[Define to 1 if you have libacl installed.])
> -AC_CHECK_HEADERS([sys/acl.h], [acl_libs="-lacl"])
> -AC_SUBST([ACL_LIBS], [$acl_libs])
> + AH_TEMPLATE(HAVE_LIBACL, [Define to 1 if you have libacl installed.])
> + AC_CHECK_LIB([acl], [acl_init], [acl_libs="-lacl"])
> + AC_SUBST([ACL_LIBS], [$acl_libs])
> ])
The acl1.c ifdefs around HAVE_SYS_ACL_H, we should make use of
HAVE_LIBACL there instead otherwise it's still broken, right?
Also we should do something as AC_DEFINE(HAVE_LIBACL, ...) in the
AC_CHECK_LIB() and we may also drop the header check.
I guess that we should do something as:
AC_CHECK_LIB([acl], [acl_init],
[AC_DEFINE(HAVE_LIBACL, 1, "Define to 1 if you have libacl installed"),
AC_SUBST(ACL_LIBS, "-lacl)])
Per all libraries, so that we would end up with HAVE_LIBACL to be used
in #ifdefs in C code and with ACL_LIBS to be used in Makefiles. We have
to do both to avoid compilation failures.
We would have to keep a few check for headers though, since we do have a
few checks for HAVE_FOO_H in the include/lapi/ headers that turn on/off
fallback definitions.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2017-10-09 15:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-09 11:00 [LTP] [RFC PATCH v2 0/7] Fix 32-bit cross compilation Petr Vorel
2017-10-09 11:00 ` [LTP] [RFC PATCH v2 1/7] m4: Fix libkeyutils detection on 32-bit cross build Petr Vorel
2017-10-09 15:06 ` Cyril Hrubis
2017-10-09 17:04 ` Petr Vorel
2017-10-09 11:00 ` [LTP] [RFC PATCH v2 2/7] m4: Fix libacl " Petr Vorel
2017-10-09 15:29 ` Cyril Hrubis [this message]
2017-10-09 11:00 ` [LTP] [RFC PATCH v2 3/7] m4: Simplify check for linux/can.h header Petr Vorel
2017-10-09 15:37 ` Cyril Hrubis
2017-10-09 11:00 ` [LTP] [RFC PATCH v2 4/7] m4: Simplify check for linux/keyctl.h header Petr Vorel
2017-10-09 11:00 ` [LTP] [RFC PATCH v2 5/7] m4: Fix libcrypto detection on 32-bit cross build Petr Vorel
2017-10-09 15:43 ` Cyril Hrubis
2017-10-09 11:01 ` [LTP] [RFC PATCH v2 6/7] make: Remove workarounds for build without libnuma Petr Vorel
2017-10-09 11:01 ` [LTP] [RFC PATCH v2 7/7] m4, kernel/lib: Detect libnuma presence in kernel libs Petr Vorel
2017-10-09 15:59 ` Cyril Hrubis
2017-10-09 17:05 ` Petr Vorel
2017-10-09 11:23 ` [LTP] [RFC PATCH v2 0/7] Fix 32-bit cross compilation Richard Palethorpe
2017-10-09 12:49 ` Petr Vorel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171009152950.GE25633@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox