aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timothy Redaelli <drizzt@gentoo.org> 2007-05-09 21:23:13 +0000
committerAvatar Timothy Redaelli <drizzt@gentoo.org> 2007-05-09 21:23:13 +0000
commitd542348bb91c2f6063f2f36773e2f14f8a98839b (patch)
treec0fbf14981799f684d5bab33e79b62d6e2b264f3
parent26b0372c3db216f6db07bb4fc61c6d67932742dd (diff)
downloadpaludis-d542348bb91c2f6063f2f36773e2f14f8a98839b.tar.gz
paludis-d542348bb91c2f6063f2f36773e2f14f8a98839b.tar.xz
Add support for non-GNU ldconfig.
-rw-r--r--configure.ac13
-rw-r--r--paludis/repositories/gentoo/ebuild.cc4
2 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a0f59ed..a1fff08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1003,6 +1003,19 @@ else
fi
dnl }}}
+dnl {{{ is ldconfig gnu ldconfig
+AC_MSG_CHECKING([if we have GNU ldconfig])
+ldconfig --version &>/dev/null && paludis_is_gnu_ldconfig=yes
+if test x$paludis_is_gnu_ldconfig = "xyes"; then
+ AC_DEFINE([HAVE_GNU_LDCONFIG], 1, [Define to 1 if you have GNU 'ldconfig'.])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([HAVE_GNU_LDCONFIG])
+AM_CONDITIONAL([HAVE_GNU_LDCONFIG], test x$paludis_is_gnu_ldconfig = "xyes")
+dnl }}}
+
dnl {{{ built sources
GENERATED_FILE=misc/generated-file.txt
AC_SUBST_FILE(GENERATED_FILE)
diff --git a/paludis/repositories/gentoo/ebuild.cc b/paludis/repositories/gentoo/ebuild.cc
index a8b01c3..257bc90 100644
--- a/paludis/repositories/gentoo/ebuild.cc
+++ b/paludis/repositories/gentoo/ebuild.cc
@@ -586,7 +586,11 @@ VDBPostMergeCommand::operator() ()
if (! getenv_with_default("PALUDIS_NO_GLOBAL_HOOKS", "").empty())
return;
+#ifdef HAVE_GNU_LDCONFIG
std::string ebuild_cmd("ldconfig -r '" + stringify(params.root) + "'");
+#else
+ std::string ebuild_cmd("ldconfig -elf -i -f '" + stringify(params.root) + "var/run/ld-elf.so.hints' '" + stringify(params.root) + "etc/ld.so.conf'");
+#endif
if (0 != (run_command(ebuild_cmd)))
throw PackageInstallActionError("VDB Entry post merge commands failed");