Run ldconfig(8) after any library gets installed.
authorshort <>
Tue, 4 Nov 2003 16:08:03 +0000 (16:08 +0000)
committershort <>
Tue, 4 Nov 2003 16:08:03 +0000 (16:08 +0000)
Check library installation directory in '/etc/ld.so.conf'.

README
src/client/lufs/Makefile.am
src/libcaptive/Makefile.am

diff --git a/README b/README
index 4303cb4..6fb26d3 100644 (file)
--- 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
 -------------
index dcdf68e..2a71a94 100644 (file)
@@ -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
index cfb77d8..7c8baa7 100644 (file)
@@ -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
+