| |
@@ -74,20 +74,13 @@
|
| |
AC_DEFINE_UNQUOTED(DEFAULT_RECONNECT_TIMEOUT,$DEFAULT_RECONNECT_TIMEOUT,[Define to the default amount of time which oddjobd will pause between attempts to reconnect to the system message bus after being disconnected for any reason.])
|
| |
AC_SUBST(DEFAULT_RECONNECT_TIMEOUT)
|
| |
|
| |
- AC_ARG_ENABLE(systemd,
|
| |
- AS_HELP_STRING([--enable-systemd],[install unit file for systemd]),
|
| |
- SYSTEMD=$enableval,
|
| |
- SYSTEMD=no)
|
| |
-
|
| |
- AC_SUBST(SYSTEMD)
|
| |
- AM_CONDITIONAL(SYSTEMD,test x$SYSTEMD != xno)
|
| |
- if test x$SYSTEMD = xyes ; then
|
| |
- SYSTEMDSYSTEMUNITDIR=`pkg-config --variable=systemdsystemunitdir systemd 2> /dev/null`
|
| |
- AC_MSG_RESULT(will install systemd unit file)
|
| |
- else
|
| |
- AC_MSG_RESULT(will install sysv init script)
|
| |
- fi
|
| |
- AC_SUBST(SYSTEMDSYSTEMUNITDIR)
|
| |
+ AC_ARG_WITH([systemdsystemunitdir],
|
| |
+ [AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
|
| |
+ [Directory for systemd service files])],,
|
| |
+ [PKG_CHECK_VAR([with_systemdsystemunitdir],[systemd],
|
| |
+ [systemdsystemunitdir],,
|
| |
+ [with_systemdsystemunitdir=${libdir}/systemd/system])])
|
| |
+ AC_SUBST([systemdsystemunitdir],[$with_systemdsystemunitdir])
|
| |
|
| |
AC_ARG_ENABLE(sample,
|
| |
AS_HELP_STRING(--enable-sample,[Build and install a sample service.]),
|
| |
@@ -365,47 +358,6 @@
|
| |
AC_SUBST(currentgid)
|
| |
AC_PATH_PROGS(PATH_PWD,pwd,pwd)
|
| |
|
| |
- AC_ARG_ENABLE(systemd,
|
| |
- AS_HELP_STRING(--enable-systemd,[Install systemd unit files]),
|
| |
- systemd=$enableval
|
| |
- if test x$systemd = xyes ; then
|
| |
- SYSTEMDSYSTEMUNITDIR=`pkg-config --variable=systemdsystemunitdir systemd`
|
| |
- fi
|
| |
- ,
|
| |
- if pkg-config systemd 2> /dev/null ; then
|
| |
- SYSTEMDSYSTEMUNITDIR=`pkg-config --variable=systemdsystemunitdir systemd 2> /dev/null`
|
| |
- systemd=yes
|
| |
- else
|
| |
- systemd=no
|
| |
- fi
|
| |
- )
|
| |
-
|
| |
- AC_ARG_ENABLE(sysvinit,
|
| |
- AS_HELP_STRING(--enable-sysvinit,[Install sysvinit unit files]),
|
| |
- sysvinit=$enableval,
|
| |
- if test x$systemd = xno ; then
|
| |
- sysvinit=yes
|
| |
- else
|
| |
- sysvinit=no
|
| |
- fi
|
| |
- )
|
| |
- if test x$systemd = xyes ; then
|
| |
- AC_MSG_RESULT([installing systemd unit file])
|
| |
- if test "x$SYSTEMDSYSTEMUNITDIR" = x ; then
|
| |
- AC_MSG_ERROR([error locating systemd system unit directory])
|
| |
- fi
|
| |
- AC_SUBST(SYSTEMDSYSTEMUNITDIR)
|
| |
- else
|
| |
- AC_MSG_RESULT([not installing systemd unit file])
|
| |
- fi
|
| |
- AM_CONDITIONAL(SYSTEMD,test x$systemd = xyes)
|
| |
- if test x$sysvinit = xyes ; then
|
| |
- AC_MSG_RESULT([installing sysv init script])
|
| |
- else
|
| |
- AC_MSG_RESULT([not installing sysv init script])
|
| |
- fi
|
| |
- AM_CONDITIONAL(SYSVINIT,test x$sysvinit = xyes)
|
| |
-
|
| |
AC_ARG_ENABLE(pie,
|
| |
AS_HELP_STRING(--enable-pie,[Build position-independent executables.]),
|
| |
pie=$enableval,
|
| |
There is no need to conditionally install one or the other, furthermore, this package does not used "systemdsysunitdir". This patch removes the conditional install logic and installs both (the systemd unit in systemdsysunitdir). The "uneeded" one can be deleted at install/merge time (Spec file updated to do just that).