From c31211167bc2b98f51f8f3cc70bb410250b427aa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Dec 2000 06:23:01 +0000 Subject: Added better configure test for POSIX ACLs. Fixed stupid typo in sysacls.c Jeremy. (This used to be commit da6ae57501e3cb971e82eac5bb05efcd9cf443ae) --- source3/configure | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 5 deletions(-) (limited to 'source3/configure') diff --git a/source3/configure b/source3/configure index 13bc020582..dd76db650f 100755 --- a/source3/configure +++ b/source3/configure @@ -11481,12 +11481,90 @@ if test "${with_posix_acls+set}" = set; then withval="$with_posix_acls" case "$withval" in yes) - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + + echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6 +echo "configure:11487: 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lacl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for POSIX ACL support""... $ac_c" 1>&6 +echo "configure:11534: checking for POSIX 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 < +#include +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:11548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_HAVE_POSIX_ACLS=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_HAVE_POSIX_ACLS=no +fi +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""yes" 1>&6 + cat >> confdefs.h <<\EOF #define HAVE_POSIX_ACLS 1 EOF - ;; +fi + ;; *) echo "$ac_t""no" 1>&6 ;; @@ -11502,11 +11580,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else -- cgit