Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Lan Yixun (dlan) <dennis.yxun <at> gmail.com>
Subject: [PATCH 1/2] seperate option of --with-systemd from install systemd unit file
Newsgroups: gmane.linux.kernel.autofs
Date: Monday 19th August 2013 06:23:17 UTC (over 4 years ago)
From: "Lan Yixun (dlan)" 

---
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) 
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
CD: 3ms