[
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            AC_MSG_ERROR([Libtool is enabled, not compatible with static tools, 
+  please rerun configure with --disable-libtool])
          fi
          support_static_tools=yes
        fi
    [
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            AC_MSG_ERROR([Libtool is enabled, not compatible with static tools, 
+  please rerun configure with --disable-libtool])
          fi
          support_static_fd=yes
        fi
    [
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            AC_MSG_ERROR([Libtool is enabled, not compatible with static tools, 
+  please rerun configure with --disable-libtool])
          fi
          support_static_sd=yes
        fi
    [
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            AC_MSG_ERROR([Libtool is enabled, not compatible with static tools, 
+  please rerun configure with --disable-libtool])
          fi
          support_static_dir=yes
        fi
    [
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            AC_MSG_ERROR([Libtool is enabled, not compatible with static tools, 
+  please rerun configure with --disable-libtool])
          fi
          support_static_cons=yes
        fi
 dnl
 dnl Check for ACL support and libraries
 dnl
-support_acl=yes
+support_acl=auto
 AC_ARG_ENABLE(acl,
    AC_HELP_STRING([--disable-acl], [disable acl support @<:@default=auto@:>@]),
    [
-       if test x$enableval = xno; then
+       if test x$enableval = xyes; then
+         support_acl=yes
+       elif test x$enableval = xno; then
          support_acl=no
        fi
    ]
 
 have_acl=no
 have_extended_acl=no
-if test x$support_acl = xyes; then
+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])] , )
    AC_CHECK_FUNC(acl_get_file,
       [
          )
       ]
    )
-   if test $have_acl = yes; then
-      AC_DEFINE([HAVE_ACL], [], [Normal attribute support])
-   fi
 
-   if test $have_extended_acl = yes; then
-      AC_DEFINE([HAVE_EXTENDED_ACL], [], [Extended attribute support])
+   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])
+   else
+      if test $have_acl = yes; then
+        AC_DEFINE([HAVE_ACL], [], [Normal attribute support])
+      fi
+
+      if test $have_extended_acl = yes; then
+        AC_DEFINE([HAVE_EXTENDED_ACL], [], [Extended attribute support])
+      fi
    fi
 fi
 
 dnl
 dnl Check for XATTR support
 dnl
-support_xattr=yes
+support_xattr=auto
 AC_ARG_ENABLE(xattr,
    AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
    [
-       if test x$enableval = xno; then
+       if test x$enableval = xyes; then
+         support_xattr=yes
+       elif test x$enableval = xno; then
          support_xattr=no
        fi
    ]
 )
 
 have_xattr=no
-if test x$support_xattr = xyes; then
+if test x$support_xattr = xyes -o x$support_xattr = xauto; then
    AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
    AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
       [
       fi
    fi
 
-   if test $have_xattr = yes; then
-      AC_DEFINE([HAVE_XATTR], [], [XATTR support])
+   if test x$support_xattr = xyes -a $have_xattr != yes; then
+      AC_MSG_ERROR([xattr support explicitly enabled but no supported xattr implementation found, 
+  please either load the xattr libraries or rerun configure without --enable-xatt])
+   else
+      if test $have_xattr = yes; then
+        AC_DEFINE([HAVE_XATTR], [], [XATTR support])
+      fi
    fi
 fi
 
 
 if test "${support_bat}" = "yes" ; then
    if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
-      echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
-      exit 1
+      AC_MSG_ERROR([Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation])
    fi
 
    QMAKEBIN="qmake"
 
   enableval=$enable_static_tools;
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
          fi
          support_static_tools=yes
        fi
   enableval=$enable_static_fd;
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
          fi
          support_static_fd=yes
        fi
   enableval=$enable_static_sd;
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
          fi
          support_static_sd=yes
        fi
   enableval=$enable_static_dir;
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
          fi
          support_static_dir=yes
        fi
   enableval=$enable_static_cons;
        if test x$enableval = xyes; then
          if test x$use_libtool = xyes; then
-            echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
-            exit 1
+            { { echo "$as_me:$LINENO: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&5
+echo "$as_me: error: Libtool is enabled, not compatible with static tools,
+  please rerun configure with --disable-libtool" >&2;}
+   { (exit 1); exit 1; }; }
          fi
          support_static_cons=yes
        fi
    have_zlib=yes
 fi
 
-support_acl=yes
+support_acl=auto
 # Check whether --enable-acl was given.
 if test "${enable_acl+set}" = set; then
   enableval=$enable_acl;
-       if test x$enableval = xno; then
+       if test x$enableval = xyes; then
+         support_acl=yes
+       elif test x$enableval = xno; then
          support_acl=no
        fi
 
 
 have_acl=no
 have_extended_acl=no
-if test x$support_acl = xyes; then
+if test x$support_acl = xyes -o x$support_acl = xauto; then
    if test "${ac_cv_header_sys_acl_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for sys/acl.h" >&5
 echo $ECHO_N "checking for sys/acl.h... $ECHO_C" >&6; }
 
 fi
 
-   if test $have_acl = yes; then
+
+   if test x$support_acl = xyes -a $have_acl != yes; then
+      { { echo "$as_me:$LINENO: error: acl support explicitly enabled but no supported acl implementation found,
+  please either load the acl libraries or rerun configure without --enable-acl" >&5
+echo "$as_me: error: acl support explicitly enabled but no supported acl implementation found,
+  please either load the acl libraries or rerun configure without --enable-acl" >&2;}
+   { (exit 1); exit 1; }; }
+   else
+      if test $have_acl = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_ACL
 _ACEOF
 
-   fi
+      fi
 
-   if test $have_extended_acl = yes; then
+      if test $have_extended_acl = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_EXTENDED_ACL
 _ACEOF
 
+      fi
    fi
 fi
 
-support_xattr=yes
+support_xattr=auto
 # Check whether --enable-xattr was given.
 if test "${enable_xattr+set}" = set; then
   enableval=$enable_xattr;
-       if test x$enableval = xno; then
+       if test x$enableval = xyes; then
+         support_xattr=yes
+       elif test x$enableval = xno; then
          support_xattr=no
        fi
 
 
 
 have_xattr=no
-if test x$support_xattr = xyes; then
+if test x$support_xattr = xyes -o x$support_xattr = xauto; then
    if test "${ac_cv_header_sys_xattr_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for sys/xattr.h" >&5
 echo $ECHO_N "checking for sys/xattr.h... $ECHO_C" >&6; }
       fi
    fi
 
-   if test $have_xattr = yes; then
+   if test x$support_xattr = xyes -a $have_xattr != yes; then
+      { { echo "$as_me:$LINENO: error: xattr support explicitly enabled but no supported xattr implementation found,
+  please either load the xattr libraries or rerun configure without --enable-xatt" >&5
+echo "$as_me: error: xattr support explicitly enabled but no supported xattr implementation found,
+  please either load the xattr libraries or rerun configure without --enable-xatt" >&2;}
+   { (exit 1); exit 1; }; }
+   else
+      if test $have_xattr = yes; then
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_XATTR
 _ACEOF
 
+      fi
    fi
 fi
 
 
 if test "${support_bat}" = "yes" ; then
    if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
-      echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
-      exit 1
+      { { echo "$as_me:$LINENO: error: Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation" >&5
+echo "$as_me: error: Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation" >&2;}
+   { (exit 1); exit 1; }; }
    fi
 
    QMAKEBIN="qmake"