[systemd-commits] autogen.sh configure.ac Makefile.am README

Kay Sievers kay at kemper.freedesktop.org
Thu Jul 14 16:32:25 PDT 2011


 Makefile.am  |   22 ++++++++++++++++++++--
 README       |    2 +-
 autogen.sh   |   12 +++++++++++-
 configure.ac |   15 +++++++++++----
 4 files changed, 43 insertions(+), 8 deletions(-)

New commits:
commit ae446765eb0605d2451bb4dd7c336672bcc7ab0c
Author: Kay Sievers <kay.sievers at vrfy.org>
Date:   Fri Jul 15 01:31:06 2011 +0200

    libsystemd-daemon: support installation in --with-rootlibdir

diff --git a/Makefile.am b/Makefile.am
index fc59b57..54f414a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -194,10 +194,11 @@ endif
 
 lib_LTLIBRARIES = \
 	libsystemd-daemon.la \
-        libsystemd-login.la
+	libsystemd-login.la
 
 pkginclude_HEADERS = \
-        src/sd-login.h
+	src/sd-daemon.h \
+	src/sd-login.h
 
 noinst_PROGRAMS = \
 	test-engine \
@@ -1380,6 +1381,19 @@ libsystemd_daemon_la_LDFLAGS = \
         -version-info $(LIBSYSTEMD_DAEMON_CURRENT):$(LIBSYSTEMD_DAEMON_REVISION):$(LIBSYSTEMD_DAEMON_AGE) \
         -Wl,--version-script=$(top_srcdir)/src/libsystemd-daemon.sym
 
+# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
+libsystemd-daemon-install-hook:
+	if test "$(libdir)" != "$(rootlibdir)"; then \
+		mkdir -p $(DESTDIR)$(rootlibdir) && \
+		so_img_name=$$(readlink $(DESTDIR)$(libdir)/libsystemd-daemon.so) && \
+		so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
+		ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libsystemd-daemon.so && \
+		mv $(DESTDIR)$(libdir)/libsystemd-daemon.so.* $(DESTDIR)$(rootlibdir); \
+	fi
+
+libsystemd-daemon-uninstall-hook:
+	rm -f $(DESTDIR)$(rootlibdir)/libsystemd-daemon.so*
+
 libsystemd_login_la_SOURCES = \
         src/sd-login.c \
         src/cgroup-util.c
@@ -1808,6 +1822,10 @@ if HAVE_SYSV_COMPAT
 		$(LN_S) ../var-lock.mount var-lock.mount )
 endif
 
+install-exec-hook: libsystemd-daemon-install-hook
+
+uninstall-hook: libsystemd-daemon-uninstall-hook
+
 DISTCHECK_CONFIGURE_FLAGS = \
 	--with-dbuspolicydir=$$dc_install_base/$(dbuspolicydir) \
 	--with-dbussessionservicedir=$$dc_install_base/$(dbussessionservicedir) \
diff --git a/README b/README
index c58fbcb..b7b0db7 100644
--- a/README
+++ b/README
@@ -31,7 +31,7 @@ LICENSE:
 
 REQUIREMENTS:
         Linux kernel >= 2.6.30 (with devtmpfs, cgroups; optional but strongly recommended: autofs4, ipv6)
-        libudev >= 163
+        libudev >= 172
         dbus >= 1.4.0
         libcap
         gtk+ >= 2.20 (optional)
diff --git a/autogen.sh b/autogen.sh
index 55a115d..b2b680a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -52,6 +52,10 @@ if type -p colorgcc > /dev/null ; then
    export CC=colorgcc
 fi
 
+libdir() {
+    echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
+}
+
 if [ "x$1" = "xam" ] ; then
     run_versioned automake "$AM_VERSION" -a -c --foreign
     ./config.status
@@ -67,7 +71,13 @@ else
     run_versioned automake "$AM_VERSION" --copy --foreign --add-missing
 
     if [ "x$1" != "xac" ]; then
-        CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --with-rootdir= --libexecdir=/usr/lib "$@"
+        CFLAGS="$CFLAGS -g -O0" ./configure \
+          --sysconfdir=/etc \
+          --localstatedir=/var \
+          --libexecdir=/usr/lib \
+          --libdir=$(libdir /usr/local/lib) \
+          --with-rootdir= \
+          "$@"
         make clean
     fi
 fi
diff --git a/configure.ac b/configure.ac
index 3b41dbc..198a639 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,6 +521,11 @@ AC_ARG_WITH([rootdir],
         [],
         [with_rootdir=${ac_default_prefix}])
 
+AC_ARG_WITH([rootlibdir],
+        AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
+        [],
+        [with_rootlibdir=${libdir}])
+
 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
@@ -528,11 +533,11 @@ AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
 AC_SUBST([udevrulesdir], [$with_udevrulesdir])
 AC_SUBST([pamlibdir], [$with_pamlibdir])
 AC_SUBST([rootdir], [$with_rootdir])
+AC_SUBST([rootlibdir], [$with_rootlibdir])
 
 AC_CONFIG_FILES([Makefile po/Makefile.in])
 AC_OUTPUT
-
-echo "
+AC_MSG_RESULT([
         $PACKAGE_NAME $VERSION
 
         Distribution:            ${with_distro}
@@ -550,10 +555,12 @@ echo "
         plymouth:                ${have_plymouth}
         prefix:                  ${prefix}
         root dir:                ${with_rootdir}
-        udev rules dir:          ${with_udevrulesdir}
+        lib dir:                 ${libdir}
+        rootlib dir:             ${with_rootlibdir}
         pam modules dir:         ${with_pamlibdir}
+        udev rules dir:          ${with_udevrulesdir}
         dbus policy dir:         ${with_dbuspolicydir}
         dbus session dir:        ${with_dbussessionservicedir}
         dbus system dir:         ${with_dbussystemservicedir}
         dbus interfaces dir:     ${with_dbusinterfacedir}
-"
+])



More information about the systemd-commits mailing list