]> arthur.barton.de Git - netatalk.git/commitdiff
Add configure option --with-afpstats
authorRalph Boehme <sloowfranklin@gmail.com>
Fri, 3 May 2013 08:16:32 +0000 (10:16 +0200)
committerRalph Boehme <sloowfranklin@gmail.com>
Fri, 3 May 2013 08:16:32 +0000 (10:16 +0200)
NEWS
macros/netatalk.m4
macros/summary.m4

diff --git a/NEWS b/NEWS
index c74787bfa8773791b1681f1f351953af245b1cdc..9e01e0f70892c3d6d92997321ac590df7bd7ae77 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Changes in 3.1.0
+================
+* UPD: Add configure option --with-afpstats for overriding the
+       result of autodetecting dbus-glib presence
+
 Changes in 3.0.4
 ================
 * FIX: Opening files without metadata EA may result in an invalid
index 835f75fc7a84008ab9b604bbfe82a04f263e66e6..56998793b3f6bb2212b96142937409c96cc84d36 100644 (file)
@@ -35,16 +35,19 @@ AC_DEFUN([AC_NETATALK_DTRACE], [
 
 dnl Check for dbus-glib, for AFP stats
 AC_DEFUN([AC_NETATALK_DBUS_GLIB], [
-    atalk_cv_with_dbus=no
+  atalk_cv_with_dbus=no
+
+  AC_ARG_WITH(afpstats,
+    AS_HELP_STRING(
+      [--with-afpstats],
+      [Enable AFP statistics via dbus (default: enabled if dbus found)]
+    ),,[withval=auto]
+  )
+
+  if test x"$withval" != x"no" ; then
     PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.1, have_dbus=yes, have_dbus=no)
     PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1, have_dbus_glib=yes, have_dbus_glib=no)
     PKG_CHECK_MODULES(DBUS_GTHREAD, gthread-2.0, have_dbus_gthread=yes, have_dbus_gthread=no)
-    AC_SUBST(DBUS_CFLAGS)
-    AC_SUBST(DBUS_LIBS)
-    AC_SUBST(DBUS_GLIB_CFLAGS)
-    AC_SUBST(DBUS_GLIB_LIBS)
-    AC_SUBST(DBUS_GTHREAD_CFLAGS)
-    AC_SUBST(DBUS_GTHREAD_LIBS)
     if test x$have_dbus_glib = xyes -a x$have_dbus = xyes -a x$have_dbus_gthread = xyes ; then
         saved_CFLAGS=$CFLAGS
         saved_LIBS=$LIBS
@@ -54,20 +57,32 @@ AC_DEFUN([AC_NETATALK_DBUS_GLIB], [
         CFLAGS="$saved_CFLAGS"
         LIBS="$saved_LIBS"
     fi
-    AM_CONDITIONAL(HAVE_DBUS_GLIB, test x$atalk_cv_with_dbus = xyes)
+  fi
 
-    AC_ARG_WITH(
-        dbus-sysconf-dir,
-        [AS_HELP_STRING([--with-dbus-sysconf-dir=PATH],[Path to dbus system bus security configuration directory (default: ${sysconfdir}/dbus-1/system.d/)])],
-        ac_cv_dbus_sysdir=$withval,
-        ac_cv_dbus_sysdir='${sysconfdir}/dbus-1/system.d'
-    )
+  if test x"$withval" = x"yes" -a x"$atalk_cv_with_dbus" = x"no"; then
+    AC_MSG_ERROR([afpstats requested but dbus-glib not found])
+  fi
 
-    if test x$atalk_cv_with_dbus = xyes ; then
-        AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if support for dbus-glib was found])
-        DBUS_SYS_DIR="$ac_cv_dbus_sysdir"
-        AC_SUBST(DBUS_SYS_DIR)
-    fi
+  AC_ARG_WITH(
+      dbus-sysconf-dir,
+      [AS_HELP_STRING([--with-dbus-sysconf-dir=PATH],[Path to dbus system bus security configuration directory (default: ${sysconfdir}/dbus-1/system.d/)])],
+      ac_cv_dbus_sysdir=$withval,
+      ac_cv_dbus_sysdir='${sysconfdir}/dbus-1/system.d'
+  )
+  DBUS_SYS_DIR=""
+  if test x$atalk_cv_with_dbus = xyes ; then
+      AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if support for dbus-glib was found])
+      DBUS_SYS_DIR="$ac_cv_dbus_sysdir"
+  fi
+
+  AC_SUBST(DBUS_SYS_DIR)
+  AC_SUBST(DBUS_CFLAGS)
+  AC_SUBST(DBUS_LIBS)
+  AC_SUBST(DBUS_GLIB_CFLAGS)
+  AC_SUBST(DBUS_GLIB_LIBS)
+  AC_SUBST(DBUS_GTHREAD_CFLAGS)
+  AC_SUBST(DBUS_GTHREAD_LIBS)
+  AM_CONDITIONAL(HAVE_DBUS_GLIB, test x$atalk_cv_with_dbus = xyes)
 ])
 
 dnl Whether to enable developer build
index 71049c73c678cfc6e758c668ebd1598cea7ed545..334ea751190eb31db4ec6f324454f40ec7e30e8b 100644 (file)
@@ -54,7 +54,7 @@ dnl   AC_MSG_RESULT([         Samba sharemode interop: $neta_cv_have_smbshmd])
        AC_MSG_RESULT([         ACL support:             $with_acl_support])
        AC_MSG_RESULT([         Kerberos support:        $with_kerberos])
        AC_MSG_RESULT([         LDAP support:            $netatalk_cv_ldap])
-       AC_MSG_RESULT([         dbus support:            $atalk_cv_with_dbus])
+       AC_MSG_RESULT([         AFP stats via dbus:      $atalk_cv_with_dbus])
        AC_MSG_RESULT([         dtrace probes:           $WDTRACE])
        AC_MSG_RESULT([    Paths:])
        AC_MSG_RESULT([         Netatalk lockfile:       $ac_cv_netatalk_lock])