Run ldconfig(8) after any library gets installed.
[captive.git] / src / libcaptive / Makefile.am
index d9356c4..7c8baa7 100644 (file)
@@ -48,3 +48,19 @@ libcaptive_la_LIBADD= \
                client/libclient.la
 libcaptive_la_LDFLAGS=-release $(VERSION)
 libcaptive_la_SOURCES=
+
+EXTRA_DIST+=captive.pod.pl.in
+CLEANFILES+=captive.pod captive.7
+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
+