From 4720a010a9f50ea94e2b1960bb944fa017afcab8 Mon Sep 17 00:00:00 2001 From: short <> Date: Tue, 4 Nov 2003 16:08:03 +0000 Subject: [PATCH] Run ldconfig(8) after any library gets installed. Check library installation directory in '/etc/ld.so.conf'. --- README | 5 +++++ src/client/lufs/Makefile.am | 15 ++++++++++++++- src/libcaptive/Makefile.am | 9 +++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/README b/README index 4303cb4..6fb26d3 100644 --- a/README +++ b/README @@ -141,6 +141,11 @@ Later you may invoke standard: Manual addition of user and group 'captive' is required for '--sandbox-server': useradd captive +Both these steps will be suggested during 'make install' if appropriate: +You may need to add '/usr/local/lib' line (without quotes) to your +'/etc/ld.so.conf' file. You may also need to run as 'root' user: + ldconfig + Bug Reporting ------------- diff --git a/src/client/lufs/Makefile.am b/src/client/lufs/Makefile.am index dcdf68e..2a71a94 100644 --- a/src/client/lufs/Makefile.am +++ b/src/client/lufs/Makefile.am @@ -40,6 +40,7 @@ lib_LTLIBRARIES+=$(liblufs_captivefs_la_cond) if ENABLE_LUFS if ENABLE_SBIN_MOUNT sbin_mount_captive_cond=mount.captive + install-exec-hook: $(mkinstalldirs) $(DESTDIR)$(enable_sbin_mountdir) IFS=:; \ @@ -50,10 +51,22 @@ install-exec-hook: $(LN_S) mount.captive $(DESTDIR)$(enable_sbin_mountdir)/mount.captive-$$fs; \ fi; \ done + if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \ + if test x$(libdir) != x/lib -a x$(libdir) != x/usr/lib && ! grep -q '^$(libdir)$$' /etc/ld.so.conf;then \ + echo -n "WARNING: Add '$(libdir)' to your '/etc/ld.so.conf' and run ldconfig(8)! Press ENTER...";read; \ + fi; \ + ldconfig || echo -n "WARNING: Failed to run ldconfig(8) - run manually! Press ENTER...";read; \ + fi else install-exec-hook: - @true + if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \ + if test x$(libdir) != x/lib -a x$(libdir) != x/usr/lib && ! grep -q '^$(libdir)$$' /etc/ld.so.conf;then \ + echo -n "WARNING: Add '$(libdir)' to your '/etc/ld.so.conf' and run ldconfig(8)! Press ENTER...";read; \ + fi; \ + ldconfig || echo -n "WARNING: Failed to run ldconfig(8) - run manually! Press ENTER...";read; \ + fi + endif else diff --git a/src/libcaptive/Makefile.am b/src/libcaptive/Makefile.am index cfb77d8..7c8baa7 100644 --- a/src/libcaptive/Makefile.am +++ b/src/libcaptive/Makefile.am @@ -55,3 +55,12 @@ if ENABLE_MAN_PAGES captive_man_cond=captive.7 endif man_MANS=$(captive_man_cond) + +install-exec-hook: + if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \ + if test x$(libdir) != x/lib -a x$(libdir) != x/usr/lib && ! grep -q '^$(libdir)$$' /etc/ld.so.conf;then \ + echo -n "WARNING: Add '$(libdir)' to your '/etc/ld.so.conf' and run ldconfig(8)! Press ENTER...";read; \ + fi; \ + ldconfig || echo -n "WARNING: Failed to run ldconfig(8) - run manually! Press ENTER...";read; \ + fi + -- 1.8.3.1