summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-12-31 19:35:52 +0100
committerLennart Poettering <lennart@poettering.net>2011-12-31 19:45:41 +0100
commite5e83e8362e946890ac991fc86a2c5869f9befdf (patch)
tree4bc240b60e45dafaf94601a11be853558ce3f30e
parentbb765041af1ac01b822a08609598d1af901e87f7 (diff)
build-sys: make readahead and vconsole optional
-rw-r--r--Makefile.am153
-rw-r--r--configure.ac16
-rw-r--r--src/readahead/readahead-collect.c (renamed from src/readahead-collect.c)0
-rw-r--r--src/readahead/readahead-common.c (renamed from src/readahead-common.c)0
-rw-r--r--src/readahead/readahead-common.h (renamed from src/readahead-common.h)0
-rw-r--r--src/readahead/readahead-replay.c (renamed from src/readahead-replay.c)0
-rw-r--r--src/readahead/sd-readahead.c (renamed from src/sd-readahead.c)0
-rw-r--r--src/readahead/sd-readahead.h (renamed from src/sd-readahead.h)0
-rw-r--r--src/vconsole/vconsole-setup.c (renamed from src/vconsole-setup.c)0
9 files changed, 105 insertions, 64 deletions
diff --git a/Makefile.am b/Makefile.am
index 0d34fb31bb..496f730955 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -96,7 +96,9 @@ AM_CPPFLAGS = \
-DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" \
-DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" \
-DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" \
- -I $(top_srcdir)/src
+ -I $(top_srcdir)/src \
+ -I $(top_srcdir)/src/readahead \
+ -I $(top_srcdir)/src/login
if TARGET_GENTOO
AM_CPPFLAGS += \
@@ -186,7 +188,6 @@ rootlibexec_PROGRAMS = \
systemd-modules-load \
systemd-remount-api-vfs \
systemd-kmsg-syslogd \
- systemd-vconsole-setup \
systemd-reply-password \
systemd-user-sessions \
systemd-fsck \
@@ -331,7 +332,6 @@ nodist_systemunit_DATA = \
units/systemd-shutdownd.service \
units/systemd-kmsg-syslogd.service \
units/systemd-modules-load.service \
- units/systemd-vconsole-setup.service \
units/systemd-remount-api-vfs.service \
units/systemd-update-utmp-runlevel.service \
units/systemd-update-utmp-shutdown.service \
@@ -370,7 +370,6 @@ EXTRA_DIST += \
units/systemd-shutdownd.service.in \
units/systemd-kmsg-syslogd.service.in \
units/systemd-modules-load.service.in \
- units/systemd-vconsole-setup.service.in \
units/systemd-remount-api-vfs.service.in \
units/systemd-update-utmp-runlevel.service.in \
units/systemd-update-utmp-shutdown.service.in \
@@ -644,7 +643,6 @@ MANPAGES = \
man/hostname.5 \
man/timezone.5 \
man/machine-id.5 \
- man/vconsole.conf.5 \
man/locale.conf.5 \
man/os-release.5 \
man/machine-info.5 \
@@ -952,12 +950,6 @@ systemd_user_sessions_SOURCES = \
systemd_user_sessions_LDADD = \
libsystemd-basic.la
-systemd_vconsole_setup_SOURCES = \
- src/vconsole-setup.c
-
-systemd_vconsole_setup_LDADD = \
- libsystemd-basic.la
-
systemd_remount_api_vfs_SOURCES = \
src/remount-api-vfs.c \
src/mount-setup.c \
@@ -1010,7 +1002,7 @@ systemctl_LDADD = \
systemd_notify_SOURCES = \
src/notify.c \
- src/sd-readahead.c
+ src/readahead/sd-readahead.c
systemd_notify_LDADD = \
libsystemd-basic.la \
@@ -1108,56 +1100,6 @@ systemd_tty_ask_password_agent_LDADD = \
libsystemd-basic.la
# ------------------------------------------------------------------------------
-systemd_readahead_collect_SOURCES = \
- src/readahead-collect.c \
- src/readahead-common.c
-
-systemd_readahead_collect_LDADD = \
- libsystemd-basic.la \
- libsystemd-daemon.la \
- $(UDEV_LIBS)
-
-systemd_readahead_replay_SOURCES = \
- src/readahead-replay.c \
- src/readahead-common.c
-
-systemd_readahead_replay_CFLAGS = \
- $(AM_CFLAGS) \
- $(UDEV_CFLAGS)
-
-systemd_readahead_replay_LDADD = \
- libsystemd-basic.la \
- libsystemd-daemon.la \
- $(UDEV_LIBS)
-
-rootlibexec_PROGRAMS += \
- systemd-readahead-collect \
- systemd-readahead-replay
-
-dist_systemunit_DATA += \
- units/systemd-readahead-done.timer
-
-nodist_systemunit_DATA += \
- units/systemd-readahead-collect.service \
- units/systemd-readahead-replay.service \
- units/systemd-readahead-done.service
-
-EXTRA_DIST += \
- src/sd-readahead.h \
- src/readahead-common.h \
- units/systemd-readahead-collect.service.in \
- units/systemd-readahead-replay.service.in \
- units/systemd-readahead-done.service.in
-
-dist_doc_DATA += \
- src/sd-readahead.h \
- src/sd-readahead.c
-
-MANPAGES += \
- man/sd_readahead.3 \
- man/sd-readahead.7
-
-# ------------------------------------------------------------------------------
libsystemd_daemon_la_SOURCES = \
src/sd-daemon.c
@@ -1480,6 +1422,91 @@ EXTRA_DIST += \
endif
# ------------------------------------------------------------------------------
+if ENABLE_VCONSOLE
+systemd_vconsole_setup_SOURCES = \
+ src/vconsole/vconsole-setup.c
+
+systemd_vconsole_setup_LDADD = \
+ libsystemd-basic.la
+
+rootlibexec_PROGRAMS += \
+ systemd-vconsole-setup
+
+nodist_systemunit_DATA += \
+ units/systemd-vconsole-setup.service
+
+vconsole-install-data-hook:
+ ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
+ rm -f systemd-vconsole-setup.service && \
+ $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service )
+
+INSTALL_DATA_HOOKS += \
+ vconsole-install-data-hook
+
+MANPAGES += \
+ man/vconsole.conf.5
+
+EXTRA_DIST += \
+ units/systemd-vconsole-setup.service.in
+endif
+
+# ------------------------------------------------------------------------------
+if ENABLE_READAHEAD
+systemd_readahead_collect_SOURCES = \
+ src/readahead/readahead-collect.c \
+ src/readahead/readahead-common.c
+
+systemd_readahead_collect_LDADD = \
+ libsystemd-basic.la \
+ libsystemd-daemon.la \
+ $(UDEV_LIBS)
+
+systemd_readahead_collect_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(UDEV_CFLAGS)
+
+systemd_readahead_replay_SOURCES = \
+ src/readahead/readahead-replay.c \
+ src/readahead/readahead-common.c
+
+systemd_readahead_replay_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(UDEV_CFLAGS)
+
+systemd_readahead_replay_LDADD = \
+ libsystemd-basic.la \
+ libsystemd-daemon.la \
+ $(UDEV_LIBS)
+
+rootlibexec_PROGRAMS += \
+ systemd-readahead-collect \
+ systemd-readahead-replay
+
+dist_systemunit_DATA += \
+ units/systemd-readahead-done.timer
+
+nodist_systemunit_DATA += \
+ units/systemd-readahead-collect.service \
+ units/systemd-readahead-replay.service \
+ units/systemd-readahead-done.service
+
+EXTRA_DIST += \
+ src/readahead/sd-readahead.h \
+ src/readahead/readahead-common.h \
+ units/systemd-readahead-collect.service.in \
+ units/systemd-readahead-replay.service.in \
+ units/systemd-readahead-done.service.in
+
+dist_doc_DATA += \
+ src/readahead/sd-readahead.h \
+ src/readahead/sd-readahead.c
+
+MANPAGES += \
+ man/sd_readahead.3 \
+ man/sd-readahead.7
+endif
+
+# ------------------------------------------------------------------------------
if ENABLE_HOSTNAMED
systemd_hostnamed_SOURCES = \
src/hostname/hostnamed.c \
@@ -2161,7 +2188,6 @@ systemd-install-data-hook:
sys-kernel-debug.mount \
sys-kernel-security.mount \
sys-fs-fuse-connections.mount \
- systemd-vconsole-setup.service \
systemd-modules-load.service \
systemd-random-seed-load.service \
systemd-tmpfiles-setup.service \
@@ -2175,7 +2201,6 @@ systemd-install-data-hook:
$(LN_S) ../sys-kernel-debug.mount sys-kernel-debug.mount && \
$(LN_S) ../sys-kernel-security.mount sys-kernel-security.mount && \
$(LN_S) ../sys-fs-fuse-connections.mount sys-fs-fuse-connections.mount && \
- $(LN_S) ../systemd-vconsole-setup.service systemd-vconsole-setup.service && \
$(LN_S) ../systemd-modules-load.service systemd-modules-load.service && \
$(LN_S) ../systemd-random-seed-load.service systemd-random-seed-load.service && \
$(LN_S) ../systemd-tmpfiles-setup.service systemd-tmpfiles-setup.service && \
diff --git a/configure.ac b/configure.ac
index 1f3bdc502a..51278bd7f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -316,6 +316,20 @@ if test "x$enable_binfmt" != "xno"; then
fi
AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
+have_vconsole=no
+AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
+if test "x$enable_vconsole" != "xno"; then
+ have_vconsole=yes
+fi
+AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
+
+have_readahead=no
+AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
+if test "x$enable_readahead" != "xno"; then
+ have_readahead=yes
+fi
+AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
+
have_logind=no
AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
if test "x$enable_logind" != "xno"; then
@@ -611,6 +625,8 @@ AC_MSG_RESULT([
XZ: ${have_xz}
ACL: ${have_acl}
binfmt: ${have_binfmt}
+ vconsole: ${have_vconsole}
+ readahead: ${have_readahead}
logind: ${have_logind}
hostnamed: ${have_hostnamed}
timedated: ${have_timedated}
diff --git a/src/readahead-collect.c b/src/readahead/readahead-collect.c
index eac11e7e5c..eac11e7e5c 100644
--- a/src/readahead-collect.c
+++ b/src/readahead/readahead-collect.c
diff --git a/src/readahead-common.c b/src/readahead/readahead-common.c
index 67214ec379..67214ec379 100644
--- a/src/readahead-common.c
+++ b/src/readahead/readahead-common.c
diff --git a/src/readahead-common.h b/src/readahead/readahead-common.h
index 9547ad201c..9547ad201c 100644
--- a/src/readahead-common.h
+++ b/src/readahead/readahead-common.h
diff --git a/src/readahead-replay.c b/src/readahead/readahead-replay.c
index 65011ac4be..65011ac4be 100644
--- a/src/readahead-replay.c
+++ b/src/readahead/readahead-replay.c
diff --git a/src/sd-readahead.c b/src/readahead/sd-readahead.c
index c5cfe67107..c5cfe67107 100644
--- a/src/sd-readahead.c
+++ b/src/readahead/sd-readahead.c
diff --git a/src/sd-readahead.h b/src/readahead/sd-readahead.h
index 5bf975a741..5bf975a741 100644
--- a/src/sd-readahead.h
+++ b/src/readahead/sd-readahead.h
diff --git a/src/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index 91967891f1..91967891f1 100644
--- a/src/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c