Run ldconfig(8) after any library gets installed.
[captive.git] / src / libcaptive / Makefile.am
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
+