Monday, April 25, 2016

[389-commits] configure configure.ac Makefile.am Makefile.in

Makefile.am | 6 +++++-
Makefile.in | 6 +++---
configure | 19 ++++++++++++++++---
configure.ac | 6 +++---
4 files changed, 27 insertions(+), 10 deletions(-)

New commits:
commit 2b38becf4b76106ff868cb41901a32a505440add
Author: William Brown <firstyear@redhat.com>
Date: Wed Apr 6 14:00:05 2016 +1000

Ticket 48447 - with-initddir should accept no

Bug Description: When porting to other platforms we should not install RH style
init scripts.

Fix Description: Allow setting "no" to initddir which will prevent creation of
any init scripts.

https://fedorahosted.org/389/ticket/48447

Author: wibrown

Review by: nhosoi (Thanks!)

diff --git a/Makefile.am b/Makefile.am
index 57b6b52..0e9939a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -695,16 +695,20 @@ systemdsystemunit_DATA = wrappers/$(PACKAGE_NAME)@.service \
wrappers/$(systemdgroupname) \
wrappers/$(PACKAGE_NAME)-snmp.service
else
+if INITDDIR
init_SCRIPTS = wrappers/$(PACKAGE_NAME) \
wrappers/$(PACKAGE_NAME)-snmp
endif
+endif

if SYSTEMD
initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME) \
wrappers/$(PACKAGE_NAME).systemd
-else
+else
+if INITDDIR
initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME)
endif
+endif

inf_DATA = ldap/admin/src/slapd.inf \
ldap/admin/src/scripts/dscreate.map \
diff --git a/Makefile.in b/Makefile.in
index e7e7403..0752ff1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2112,10 +2112,10 @@ task_SCRIPTS = ldap/admin/src/scripts/template-bak2db \
@SYSTEMD_TRUE@ wrappers/$(systemdgroupname) \
@SYSTEMD_TRUE@ wrappers/$(PACKAGE_NAME)-snmp.service

-@SYSTEMD_FALSE@init_SCRIPTS = wrappers/$(PACKAGE_NAME) \
-@SYSTEMD_FALSE@ wrappers/$(PACKAGE_NAME)-snmp
+@INITDDIR_TRUE@@SYSTEMD_FALSE@init_SCRIPTS = wrappers/$(PACKAGE_NAME) \
+@INITDDIR_TRUE@@SYSTEMD_FALSE@ wrappers/$(PACKAGE_NAME)-snmp

-@SYSTEMD_FALSE@initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME)
+@INITDDIR_TRUE@@SYSTEMD_FALSE@initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME)
@SYSTEMD_TRUE@initconfig_DATA = ldap/admin/src/$(PACKAGE_NAME) \
@SYSTEMD_TRUE@ wrappers/$(PACKAGE_NAME).systemd

diff --git a/configure b/configure
index 1cf5ecb..7dc8c3e 100755
--- a/configure
+++ b/configure
@@ -724,6 +724,8 @@ LIBNSL
LIBSOCKET
LIBCRYPT
THREADLIB
+INITDDIR_FALSE
+INITDDIR_TRUE
WINNT_FALSE
WINNT_TRUE
instconfigdir
@@ -18358,9 +18360,6 @@ $as_echo_n "checking for --with-initddir... " >&6; }
# Check whether --with-initddir was given.
if test "${with_initddir+set}" = set; then :
withval=$with_initddir;
- if test "$withval" = yes -o "$withval" = no ; then
- as_fn_error $? "Please specify a full path with --with-initddir" "$LINENO" 5
- fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
$as_echo "$withval" >&6; }

@@ -18371,6 +18370,15 @@ $as_echo "no" >&6; }

fi

+
+ if test -n "$with_initddir" -a "$with_initddir" != "no"; then
+ INITDDIR_TRUE=
+ INITDDIR_FALSE='#'
+else
+ INITDDIR_TRUE='#'
+ INITDDIR_FALSE=
+fi
+
# on most platforms, we will just use perl from PATH
# On some platforms, we cannot. Why not just use any old
# perl? Because of perldap. We use a perldap that is
@@ -18649,6 +18657,7 @@ esac
if test -n "$with_initddir" ; then
initdir="$with_initddir"
fi
+
# sysv init scripts not used when systemd is used


@@ -21696,6 +21705,10 @@ if test -z "${WINNT_TRUE}" && test -z "${WINNT_FALSE}"; then
as_fn_error $? "conditional \"WINNT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${INITDDIR_TRUE}" && test -z "${INITDDIR_FALSE}"; then
+ as_fn_error $? "conditional \"INITDDIR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HPUX_TRUE}" && test -z "${HPUX_FALSE}"; then
as_fn_error $? "conditional \"HPUX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 4be4613..9544bbc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -463,14 +463,13 @@ AC_ARG_WITH(initddir,
AS_HELP_STRING([--with-initddir=/path],
[Absolute path (not relative like some of the other options) that should contain the SysV init scripts (default '$(sysconfdir)/rc.d')]),
[
- if test "$withval" = yes -o "$withval" = no ; then
- AC_ERROR([Please specify a full path with --with-initddir])
- fi
AC_MSG_RESULT($withval)
],
[
AC_MSG_RESULT(no)
])
+
+AM_CONDITIONAL([INITDDIR], [test -n "$with_initddir" -a "$with_initddir" != "no"])
# on most platforms, we will just use perl from PATH
# On some platforms, we cannot. Why not just use any old
# perl? Because of perldap. We use a perldap that is
@@ -618,6 +617,7 @@ esac
if test -n "$with_initddir" ; then
initdir="$with_initddir"
fi
+
# sysv init scripts not used when systemd is used
AC_SUBST(initdir)
AC_SUBST(perlexec)

--
389-commits mailing list
389-commits@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/389-commits@lists.fedoraproject.org

No comments:

Post a Comment