diff options
author | Jeremy Huddleston <jeremy@yuffie.local> | 2007-12-15 15:01:02 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremy@yuffie.local> | 2007-12-15 15:01:02 -0800 |
commit | f5db2f6bc21b8d589b92c0f1d60bd6ec8da21ae0 (patch) | |
tree | 160161b98aef2e8ad4a2d6f5d10a3678c64b4e7a /configure.ac | |
parent | c0246278393f9440717eea292a3d31440f7972dd (diff) |
Added Apple launchd support
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 05a7d17..34f021e 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,33 @@ AC_ARG_WITH(xinit, [XINIT="$withval"], [XINIT="$DEFAULT_XINIT"]) +AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with suppo +rt for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto]) +AC_ARG_WITH(launchagents-dir,AS_HELP_STRING([--with-launchagents-dir=PATH], [Pat +h to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]), + [ launchagentsdir="${withval}" ], + [ launchagentsdir="/Library/LaunchAgents" ]) +AC_SUBST([launchagentsdir]) + +if test "x$LAUNCHD" = "xauto"; then + unset LAUNCHD + AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) +fi + +if test "x$LAUNCHD" = "xyes" ; then + AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) + + # For now, this is how we find X11.app on OS-X... + # A future version of launchd should let us do this cleaner + case $host_os in + darwin*) + XSERVER=\'\`'$(libexecdir)/x11-exec'\`\' + AM_CONDITIONAL(APPLE, true) + ;; + esac +fi +AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) + # Checks for pkg-config packages PKG_CHECK_MODULES(XINIT, x11) @@ -148,3 +175,4 @@ XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION AC_OUTPUT([Makefile]) +AC_OUTPUT([launchd/Makefile]) |