diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-12-10 01:35:03 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-12-10 01:35:59 -0500 |
commit | 18850c5c889bd48e0caeddf719bcf05c2029b95f (patch) | |
tree | 386ac9d67d842bd8dd606e21f5365e78321f37d5 /configure.ac | |
parent | 8a535e7e064b0c33c3b60a92df88b349d79b94c2 (diff) | |
download | lighttpd-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.ac | 23 |
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 |