[PATCH 1/2] seperate option of --with-systemd from install systemd unit file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Lan Yixun (dlan)" <dennis.yxun@xxxxxxxxx>

---
another patch will be instroduced "introduce new --with-systemdsystemunitdir"
I kept option --with-systemd here in case we may use it in the future,
but can be deleted if you think it not necessary, cause it's not useless now.

the default use case is "--with-systemd", so systemd enabled by default.

Signed-off-by: Lan Yixun (dlan) <dennis.yxun@xxxxxxxxx>
---
 aclocal.m4          | 35 +++++++++++++++--------------------
 include/config.h.in |  3 +++
 2 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index c5de159..5cdc7e4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -225,29 +225,24 @@ fi], [AC_MSG_RESULT(no)])
 dnl --------------------------------------------------------------------------
 dnl AF_WITH_SYSTEMD
 dnl
-dnl Check the location of the systemd unit files directory
+dnl Check if systemd support is wanted
 dnl --------------------------------------------------------------------------
 AC_DEFUN([AF_WITH_SYSTEMD],
-[AC_ARG_WITH(systemd,
-[  --with-systemd         install systemd unit file if systemd unit directory
-			  is found on system],
+[AC_MSG_CHECKING([if systemd support is wanted])
+AC_ARG_WITH(systemd,
+[  --with-systemd          enable systemd support, defaut is yes],
 [if test "$withval" = yes; then
-  if test -z "$systemddir"; then
-    AC_MSG_CHECKING([location of the systemd unit files directory])
-    for systemd_d in /usr/lib/systemd/system /usr/lib64/systemd/system /lib/systemd/system /lib64/systemd/system; do
-      if test -z "$systemddir"; then
-        if test -d "$systemd_d"; then
-          systemddir="$systemd_d"
-        fi
-      fi
-    done
-  fi
-  if test -n "$systemddir"; then
-    AC_MSG_RESULT($systemddir)
-  else
-    AC_MSG_RESULT(not found)
-  fi
-fi])
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(WITH_SYSTMED,1,
+    [Define if systemd support is enabled])
+else
+  AC_MSG_RESULT(no)
+fi],
+[
+ AC_MSG_RESULT(yes)
+  AC_DEFINE(WITH_SYSTMED,1,
+    [Define if systemd support is enabled])
+])
 ])
 
 dnl --------------------------------------------------------------------------
diff --git a/include/config.h.in b/include/config.h.in
index a2a05a8..a03902f 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -152,3 +152,6 @@
 
 /* Define if using SASL authentication with the LDAP module */
 #undef WITH_SASL
+
+/* Define if systemd support is enabled */
+#undef WITH_SYSTMED
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe autofs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux