]> git.sur5r.net Git - bacula/bacula/commitdiff
Rewrote ACL configure logic to be somewhat better readable in the same style as the...
authorMarco van Wieringen <mvw@planets.elm.net>
Thu, 16 Sep 2010 20:07:42 +0000 (22:07 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 30 Sep 2010 12:34:48 +0000 (14:34 +0200)
bacula/autoconf/configure.in

index 834d1a090d6f84ac07d675af1bee8c19a36df1e2..c68ecad6ad1ce02f257d3d1e86d16f9365db71a9 100644 (file)
@@ -2522,57 +2522,86 @@ have_acl=no
 have_extended_acl=no
 if test x$support_acl = xyes -o x$support_acl = xauto; then
    AC_CHECK_HEADER(sys/acl.h, [ AC_DEFINE(HAVE_SYS_ACL_H,1,[Defines if your system have the sys/acl.h header file])] , )
+
+   dnl
+   dnl First check for acl_get_file in libc
+   dnl
    AC_CHECK_FUNC(acl_get_file,
       [
          have_acl=yes
-      ], [
-         AC_CHECK_LIB(acl, acl_get_file,
-            [
-                have_acl=yes;
-                if test $have_afs = yes; then
-                   dnl
-                   dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
-                   dnl
-                   if test -d /usr/lib64/; then
-                      FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
-                   else
-                      FDLIBS="-L/usr/lib -lacl $FDLIBS"
-                   fi
-                else
-                   FDLIBS="-lacl $FDLIBS"
-                fi
-            ], [
-                AC_CHECK_LIB(pacl, acl_get_file,
-                   [
-                       have_acl=yes;
-                       FDLIBS="-lpacl $FDLIBS"
-                   ], [
-                       AC_CHECK_LIB(sec, acltotext,
-                          [
-                              have_acl=yes;
-                              FDLIBS="-lsec $FDLIBS"
-
-                              AC_CHECK_LIB(sec, acl_totext,
-                                 [
-                                     have_extended_acl=yes
-                                 ]
-                              )
-                          ], [
-                               dnl check for AIX
-                               AC_CHECK_FUNC(acl_get,
-                                 [
-                                     have_acl=yes
-                                 ]
-                              )
-                              ]
-                       )
-                   ]
-                )
-            ]
-         )
       ]
    )
 
+   dnl
+   dnl Check for acl_get_file in libacl (Linux)
+   dnl
+   if test $have_acl = no; then
+      AC_CHECK_LIB(acl, acl_get_file,
+         [
+            have_acl=yes
+             if test $have_afs = yes; then
+                dnl
+                dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
+                dnl
+                if test -d /usr/lib64/; then
+                   FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
+                else
+                   FDLIBS="-L/usr/lib -lacl $FDLIBS"
+                fi
+             else
+                FDLIBS="-lacl $FDLIBS"
+             fi
+         ]
+      )
+   fi
+
+   dnl
+   dnl Check for acl_get_file in libpacl (OSF1)
+   dnl
+   if test $have_acl = no; then
+      AC_CHECK_LIB(pacl, acl_get_file,
+         [
+            have_acl=yes
+             FDLIBS="-lpacl $FDLIBS"
+         ]
+      )
+   fi
+
+   dnl
+   dnl Check for acltotext and acl_totext (Solaris)
+   dnl
+   if test $have_acl = no; then
+      AC_CHECK_LIB(sec, acltotext,
+         [
+            have_acl=yes
+             FDLIBS="-lsec $FDLIBS"
+
+             AC_CHECK_LIB(sec, acl_totext,
+                [
+                    have_extended_acl=yes
+                ]
+             )
+         ]
+      )
+   fi
+
+   dnl
+   dnl Check for acl_get and aclx_get (AIX)
+   dnl
+   if test $have_acl = no; then
+      AC_CHECK_FUNC(acl_get,
+         [
+            have_acl=yes
+
+             AC_CHECK_FUNC(aclx_get,
+                [
+                    have_extended_acl=yes
+                ]
+             )
+         ]
+      )
+   fi
+
    if test x$support_acl = xyes -a $have_acl != yes; then
       AC_MSG_ERROR([acl support explicitly enabled but no supported acl implementation found, 
   please either load the acl libraries or rerun configure without --enable-acl])