]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
osx: make the path to /Library/LaunchDaemons configurable
authorVincent Bernat <bernat@luffy.cx>
Sat, 13 Jul 2013 15:59:47 +0000 (17:59 +0200)
committerVincent Bernat <bernat@luffy.cx>
Sat, 13 Jul 2013 16:01:40 +0000 (18:01 +0200)
This path can also be set to `no` to avoid the installation of such a daemon.

configure.ac
osx/Makefile.am

index 0cb8079187409bc6ac6a51a2454d2c67761542b9..bec8ddc6b67f0fc77b2ef172658121fd702518c9 100644 (file)
@@ -175,6 +175,9 @@ if test x"$with_json" = x"yes"; then
    lldp_CHECK_JANSSON
 fi
 
+# OS X launchd support
+lldp_ARG_WITH([launchd-daemons-path], [Path to system-wide daemons configuration files (OSX)], [/Library/LaunchDaemons])
+
 # Privsep settings
 lldp_ARG_WITH([privsep-user], [Which user to use for privilege separation], [_lldpd])
 lldp_ARG_WITH([privsep-group], [Which group to use for privilege separation], [_lldpd])
index d924c87a4d584976cad705546cafe1752dd2f3c6..7f34c2af802297568e1636129674829a31328f51 100644 (file)
@@ -58,10 +58,10 @@ $(ARCHS:%=stamp-%): stamp-%: im.bernat.lldpd.plist
 
 # Install launchd plist
 install-data-local:
-       install -m 0755 -d $(DESTDIR)/Library/LaunchDaemons
-       install -m 0644 im.bernat.lldpd.plist $(DESTDIR)/Library/LaunchDaemons
+       [ x"@LAUNCHD_DAEMONS_PATH@" = x"no" ] || install -m 0755 -d $(DESTDIR)@LAUNCHD_DAEMONS_PATH@
+       [ x"@LAUNCHD_DAEMONS_PATH@" = x"no" ] || install -m 0644 im.bernat.lldpd.plist $(DESTDIR)@LAUNCHD_DAEMONS_PATH@
 uninstall-local:
-       rm -f $(DESTDIR)/Library/LaunchDaemons/im.bernat.lldpd.plist
+       [ x"@LAUNCHD_DAEMONS_PATH@" = x"no" ] || rm -f $(DESTDIR)@LAUNCHD_DAEMONS_PATH@/im.bernat.lldpd.plist
 clean-local:
        rm -rf $(ARCHS)
        rm -rf $(PKG_DIR)