diff options
author | Jeremy Allison <jra@samba.org> | 2001-04-14 19:46:28 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-04-14 19:46:28 +0000 |
commit | ed449b8ca7697d64ab3cfe8289287dd18566c91e (patch) | |
tree | 34541fbdd298c93db6f14d288da98321f69f2aa1 /source3/configure | |
parent | 548ca26bd56467f7dafaf277e4d42adeb54fb557 (diff) | |
download | samba-ed449b8ca7697d64ab3cfe8289287dd18566c91e.tar.gz samba-ed449b8ca7697d64ab3cfe8289287dd18566c91e.tar.bz2 samba-ed449b8ca7697d64ab3cfe8289287dd18566c91e.zip |
Added POSIX_ACL support for *BSD. Patch from jedgar@fxp.org. Changed
a bit to use AC_TRY_LINK to ensure functions are available for link
instead of AC_TRY_COMPILE.
Jeremy.
(This used to be commit c23628746342b6afa28cb34b0b4eaa61189ad390)
Diffstat (limited to 'source3/configure')
-rwxr-xr-x | source3/configure | 60 |
1 files changed, 47 insertions, 13 deletions
diff --git a/source3/configure b/source3/configure index 7cf0e29407..4a3b7f07be 100755 --- a/source3/configure +++ b/source3/configure @@ -12041,7 +12041,7 @@ EOF ;; *) - echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 + echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 echo "configure:12046: checking for acl_get_file in -lacl" >&5 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then @@ -12088,13 +12088,13 @@ else echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for ACL support""... $ac_c" 1>&6 + echo $ac_n "checking for ACL support""... $ac_c" 1>&6 echo "configure:12093: checking for ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext <<EOF + cat > conftest.$ac_ext <<EOF #line 12099 "configure" #include "confdefs.h" #include <sys/types.h> @@ -12103,7 +12103,7 @@ int main() { acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p); ; return 0; } EOF -if { (eval echo configure:12107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* samba_cv_HAVE_POSIX_ACLS=yes else @@ -12116,21 +12116,55 @@ rm -f conftest* fi echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6 - if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then - echo "$ac_t""Using posix ACLs" 1>&6 - cat >> confdefs.h <<\EOF + if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then + echo "$ac_t""Using posix ACLs" 1>&6 + cat >> confdefs.h <<\EOF #define HAVE_POSIX_ACLS 1 EOF - fi + echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6 +echo "configure:12127: checking for acl_get_perm_np" >&5 +if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 12133 "configure" +#include "confdefs.h" +#include <sys/types.h> +#include <sys/acl.h> +int main() { + acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm); +; return 0; } +EOF +if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + samba_cv_HAVE_ACL_GET_PERM_NP=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_ACL_GET_PERM_NP=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6 + if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_ACL_GET_PERM_NP 1 +EOF + + fi + fi echo $ac_n "checking for XFS ACL support""... $ac_c" 1>&6 -echo "configure:12128: checking for XFS ACL support" >&5 +echo "configure:12162: checking for XFS ACL support" >&5 if eval "test \"`echo '$''{'samba_cv_HAVE_XFS_ACLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 12134 "configure" +#line 12168 "configure" #include "confdefs.h" #include <sys/types.h> #include <acl/acl.h> @@ -12138,7 +12172,7 @@ int main() { char test_str[13] = SGI_ACL_FILE; ; return 0; } EOF -if { (eval echo configure:12142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_XFS_ACLS=yes else @@ -12183,11 +12217,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 12187 "configure" +#line 12221 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/summary.c" EOF -if { (eval echo configure:12191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else |