summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-12-10 01:35:03 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2021-12-10 01:35:59 -0500
commit18850c5c889bd48e0caeddf719bcf05c2029b95f (patch)
tree386ac9d67d842bd8dd606e21f5365e78321f37d5 /configure.ac
parent8a535e7e064b0c33c3b60a92df88b349d79b94c2 (diff)
downloadlighttpd-git-18850c5c889bd48e0caeddf719bcf05c2029b95f.tar.gz
[build] check getxattr before attr_get and -lattr
check getxattr before attr_get and -lattr; do not link with -lattr if getxattr is available from glibc (modern glibc systems do not require libattr-devel build dependency)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 13 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 698e4191..edc4883c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -489,16 +489,6 @@ AC_MSG_RESULT([$WITH_ATTR])
if test "$WITH_ATTR" != no; then
have_xattr=no
- # libattr (linux only?)
- AC_CHECK_LIB([attr], [attr_get], [
- AC_CHECK_HEADERS([attr/attributes.h], [
- ATTR_LIB=-lattr
- AC_DEFINE([HAVE_XATTR], [1], [libattr])
- AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
- have_xattr=yes
- ])
- ])
- AC_SUBST([ATTR_LIB])
# Linux getxattr
AC_CHECK_FUNC([getxattr], [
@@ -518,6 +508,19 @@ if test "$WITH_ATTR" != no; then
])
])
+ # libattr (linux only?)
+ if test "$have_xattr" = no; then
+ AC_CHECK_LIB([attr], [attr_get], [
+ AC_CHECK_HEADERS([attr/attributes.h], [
+ ATTR_LIB=-lattr
+ AC_DEFINE([HAVE_XATTR], [1], [libattr])
+ AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
+ have_xattr=yes
+ ])
+ ])
+ fi
+ AC_SUBST([ATTR_LIB])
+
if test "$have_xattr" = no; then
AC_MSG_ERROR([no backend found implementing extended attributes])
fi