]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: --with-systemdsystemunitdir wasn't working right.
authorTimo Sirainen <tss@iki.fi>
Thu, 18 Nov 2010 18:49:34 +0000 (18:49 +0000)
committerTimo Sirainen <tss@iki.fi>
Thu, 18 Nov 2010 18:49:34 +0000 (18:49 +0000)
configure.in

index 66c54a8b99b7e01ad987227936afeba87f5fd144..8a1caaad5ac46f0f93a42638b8757a531354b680 100644 (file)
@@ -219,6 +219,20 @@ AS_HELP_STRING([--with-statedir=DIR], [Permanent data directory (LOCALSTATEDIR/l
 )
 AC_SUBST(statedir)
 
+AC_ARG_WITH([systemdsystemunitdir],
+AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (auto=detect)]), [
+       if test "$withval" = "auto"; then
+               systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
+       elif test "$withval" != "no"; then
+               systemdsystemunitdir=$withval
+       fi
+], [])
+if test "$systemdsystemunitdir" != ""; then
+        AC_SUBST(systemdsystemunitdir)
+        AC_DEFINE(HAVE_SYSTEMD,, Define if you want to use systemd socket activation)
+fi
+AM_CONDITIONAL(BUILD_LUCENE, test "$systemdsystemunitdir" != "")
+
 AC_ARG_WITH(gc,
 AS_HELP_STRING([--with-gc], [Use Boehm garbage collector]),
   TEST_WITH(gc, $withval),
@@ -2624,15 +2638,6 @@ fi
 AC_SUBST(RUN_TEST)
 AC_SUBST(abs_top_builddir)
 
-AC_ARG_WITH([systemdsystemunitdir],
-        AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
-        [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
-if test "x$with_systemdsystemunitdir" != xno; then
-        AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-        AC_DEFINE(HAVE_SYSTEMD,, Define if you want to use systemd socket activation)
-fi
-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
-
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([
 Makefile