From 8b33f57e8cd5f451d55fbb0f9bcc3c119a076326 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 28 Feb 2007 10:50:46 -0500 Subject: add framework for backend tools System dependent tools will be built in subdirectories under tools. --- configure.ac | 23 +++++++++++++++++++++++ tools/Makefile.am | 8 ++++++++ tools/linux/Makefile.am | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 tools/linux/Makefile.am diff --git a/configure.ac b/configure.ac index 41403a0..2da5655 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,26 @@ fi AC_SUBST(CONSOLE_KIT_PID_FILE) AC_DEFINE_UNQUOTED(CONSOLE_KIT_PID_FILE, "$CONSOLE_KIT_PID_FILE", [pid file]) +dnl --------------------------------------------------------------------------- +dnl Figure out what tools backend to build +dnl --------------------------------------------------------------------------- + +CK_BACKEND="" +case "$host" in + *-*-freebsd*) + ;; + *-*-linux*) + CK_BACKEND="linux" + ;; + *-*-solaris*) + ;; +esac + +AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux]) +AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD]) +AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris]) +AC_SUBST(CK_BACKEND) + dnl --------------------------------------------------------------------------- dnl Finish dnl --------------------------------------------------------------------------- @@ -207,6 +227,7 @@ AC_OUTPUT([ Makefile src/Makefile tools/Makefile +tools/linux/Makefile data/Makefile data/ConsoleKit ]) @@ -229,6 +250,8 @@ echo " Base libs: ${CONSOLE_KIT_LIBS} Maintainer mode: ${USE_MAINTAINER_MODE} + Backend: ${CK_BACKEND} + dbus-1 system.d dir: ${DBUS_SYS_DIR} " diff --git a/tools/Makefile.am b/tools/Makefile.am index 6a95044..b7f515a 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -6,6 +6,14 @@ NULL = SUBDIRS = \ $(NULL) +if CK_COMPILE_LINUX +SUBDIRS += linux +endif + +DIST_SUBDIRS = \ + linux \ + $(NULL) + INCLUDES = \ -I. \ -I$(srcdir) \ diff --git a/tools/linux/Makefile.am b/tools/linux/Makefile.am new file mode 100644 index 0000000..5091efe --- /dev/null +++ b/tools/linux/Makefile.am @@ -0,0 +1,33 @@ +## We require new-style dependency handling. +AUTOMAKE_OPTIONS = 1.7 + +NULL = + +SUBDIRS = \ + $(NULL) + +INCLUDES = \ + -I. \ + -I$(srcdir) \ + $(CONSOLE_KIT_CFLAGS) \ + $(DISABLE_DEPRECATED_CFLAGS) \ + -DPREFIX=\""$(prefix)"\" \ + -DBINDIR=\""$(bindir)"\" \ + -DLIBDIR=\""$(libdir)"\" \ + -DLIBEXECDIR=\""$(libexecdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + $(WARN_CFLAGS) \ + $(DEBUG_CFLAGS) \ + $(TOOLS_CFLAGS) \ + $(NULL) + +libexec_PROGRAMS = \ + $(NULL) + +EXTRA_DIST = \ + $(NULL) + +MAINTAINERCLEANFILES = \ + *~ \ + Makefile.in -- cgit v1.2.3