From b351a36074f35b71ff06abeee6880b20a8e1f9d6 Mon Sep 17 00:00:00 2001 From: Sardem FF7 Date: Tue, 31 May 2011 01:53:28 +0200 Subject: [PATCH 2/3] Split systemadm and systemd-interfaces --- .gitignore | 1 + Makefile.am | 35 +++++++++++++++++++++++++++++++---- configure.ac | 14 +++++++++++--- src/.gitignore | 1 + 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 5669d74..ae2d204 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ test-engine test-job-type systemd-logger systemctl +libsystemd-interfaces.vapi systemadm .dirstamp *.1 diff --git a/Makefile.am b/Makefile.am index ee16f98..9c032a1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -448,6 +448,7 @@ dist_polkitpolicy_DATA = \ noinst_LTLIBRARIES = \ libsystemd-basic.la \ libsystemd-core.la \ + libsystemd-interfaces.la \ libsystemd-daemon.la libsystemd_basic_la_SOURCES = \ @@ -536,6 +537,27 @@ libsystemd_core_la_LIBADD = \ $(PAM_LIBS) \ $(AUDIT_LIBS) +libsystemd_interfaces_la_SOURCES = \ + src/systemd-interfaces.vala + +libsystemd_interfaces_la_CFLAGS = \ + $(AM_CFLAGS) \ + $(GLIB_CFLAGS) \ + -Wno-unused-variable \ + -Wno-unused-function \ + -Wno-shadow \ + -Wno-format-nonliteral + +libsystemd_interfaces_la_VALAFLAGS = \ + --library libsystemd-interfaces \ + -H src/systemd-interfaces.h \ + --pkg=posix \ + --pkg=gio-2.0 \ + -g + +libsystemd_interfaces_la_LIBADD = \ + $(GLIB_LIBS) + libsystemd_daemon_la_SOURCES = \ src/sd-daemon.c @@ -1099,11 +1121,11 @@ systemd_stdio_bridge_LDADD = \ libsystemd-basic.la systemadm_SOURCES = \ - src/systemadm.vala \ - src/systemd-interfaces.vala + src/systemadm.vala systemadm_CFLAGS = \ $(AM_CFLAGS) \ + $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ -Wno-unused-variable \ -Wno-unused-function \ @@ -1111,12 +1133,15 @@ systemadm_CFLAGS = \ -Wno-format-nonliteral systemadm_VALAFLAGS = \ + libsystemd-interfaces.vapi \ --pkg=posix \ --pkg=gtk+-2.0 \ -g systemadm_LDADD = \ - $(GTK_LIBS) + libsystemd-interfaces.la \ + $(GTK_LIBS) \ + $(GLIB_LIBS) systemd_gnome_ask_password_agent_SOURCES = \ src/gnome-ask-password-agent.vala @@ -1125,6 +1150,7 @@ systemd_gnome_ask_password_agent_CFLAGS = \ $(AM_CFLAGS) \ $(LIBNOTIFY_CFLAGS) \ $(GTK_CFLAGS) \ + $(GLIB_CFLAGS) \ -Wno-unused-variable \ -Wno-unused-function \ -Wno-shadow \ @@ -1145,7 +1171,8 @@ systemd_gnome_ask_password_agent_VALAFLAGS += \ systemd_gnome_ask_password_agent_LDADD = \ $(LIBNOTIFY_LIBS) \ - $(GTK_LIBS) + $(GTK_LIBS) \ + $(GLIB_LIBS) systemd_tty_ask_password_agent_SOURCES = \ src/tty-ask-password-agent.c \ diff --git a/configure.ac b/configure.ac index 85a14c6..cf53229 100644 --- a/configure.ac +++ b/configure.ac @@ -249,15 +249,23 @@ if test "x$enable_binfmt" != "xno"; then fi AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"]) +PKG_CHECK_MODULES(GLIB, [ glib-2.0 > 2.26 gio-2.0 ], + [AC_DEFINE(HAVE_GLIB, 1, [Define if GLib is available]) have_glib=yes], have_glib=no) +AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) +AM_CONDITIONAL(HAVE_GLIB, [test "$have_glib" = "yes"]) + have_gtk=no AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools])) if test "x$enable_gtk" != "xno"; then - PKG_CHECK_MODULES(GTK, [ gtk+-2.0 glib-2.0 > 2.26 gio-unix-2.0 ], + PKG_CHECK_MODULES(GTK, [ gtk+-2.0 gio-unix-2.0 ], [AC_DEFINE(HAVE_GTK, 1, [Define if GTK is available]) have_gtk=yes], have_gtk=no) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) - if test "x$have_gtk" = xno -a "x$enable_gtk" = xyes; then - AC_MSG_ERROR([*** gtk support requested but libraries not found]) + if test "x$have_glib" = xno -o "x$have_gtk" = xno; then + if test "x$enable_gtk" = xyes; then + AC_MSG_ERROR([*** gtk support requested but libraries not found]) + fi fi fi AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"]) diff --git a/src/.gitignore b/src/.gitignore index 4c7d3c8..69e6a6d 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,4 +1,5 @@ org.freedesktop.systemd1.policy gnome-ask-password-agent.c systemd-interfaces.c +systemd-interfaces.h systemadm.c -- 1.7.5.3.401.gfb674.dirty