chiark / gitweb /
build-sys: fix sysvcompat handling in distcheck
authorTom Gundersen <teg@jklm.no>
Tue, 20 Nov 2012 17:19:44 +0000 (18:19 +0100)
committerTom Gundersen <teg@jklm.no>
Tue, 20 Nov 2012 18:35:27 +0000 (19:35 +0100)
Distcheck would fail due to sysvinit dir being set,
but not sysvrcnd dir:

 # ./configure --enable-gtk-doc --with-sysvrcd-path=/etc/rc.d
 # --with-sysvinit-path=/etc/rc.d
 # make distcheck
 ...
 configure: error: *** You need both --with-sysvinit-path=PATH and
--with-sysvrcd-path=PATH to enable SysV compatibility support, or both
empty to disable it.
make: *** [distcheck] Error 1

This also allows sysvcompat support to be disabled from distcheck.

Makefile.am

index d08eea2..11eaf86 100644 (file)
@@ -62,6 +62,7 @@ polkitpolicydir=$(datadir)/polkit-1/actions
 bashcompletiondir=$(sysconfdir)/bash_completion.d
 rpmmacrosdir=$(sysconfdir)/rpm
 sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
+sysvrcddir=$(SYSTEM_SYSVRCND_PATH)
 varlogdir=$(localstatedir)/log
 systemdstatedir=$(localstatedir)/lib/systemd
 catalogstatedir=$(systemdstatedir)/catalog
@@ -4087,7 +4088,6 @@ clean-local:
        rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt
 
 DISTCHECK_CONFIGURE_FLAGS = \
-       --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
        --with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
        --with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
        --with-dbussystemservicedir=$$dc_install_base/$(dbussystemservicedir) \
@@ -4096,6 +4096,13 @@ DISTCHECK_CONFIGURE_FLAGS = \
        --with-rootprefix=$$dc_install_base \
        --disable-split-usr
 
+
+if HAVE_SYSV_COMPAT
+DISTCHECK_CONFIGURE_FLAGS += \
+       --with-sysvinit-path=$$dc_install_base/$(sysvinitdir) \
+       --with-sysvrcnd-path=$$dc_install_base/$(sysvrcddir)
+endif
+
 if ENABLE_GTK_DOC
 DISTCHECK_CONFIGURE_FLAGS += \
        --enable-gtk-doc