Integrate static packaing into the CVS HEAD; make it even default.
[captive.git] / src / client / lufs / Makefile.am
index b0782dd..dce58b8 100644 (file)
@@ -32,25 +32,60 @@ liblufs_captivefs_la_SOURCES= \
                captivefs-vfs.c \
                captivefs-vfs.h
 
-if HAVE_LUFS_INCLUDES
+if ENABLE_LUFS
 liblufs_captivefs_la_cond=liblufs-captivefs.la
 endif
 lib_LTLIBRARIES+=$(liblufs_captivefs_la_cond)
 
-if HAVE_LUFS_INCLUDES
-if WITH_SBIN_MOUNT
+if ENABLE_LUFS
+if ENABLE_SBIN_MOUNT
 sbin_mount_captive_cond=mount.captive
+
 install-exec-hook:
-       $(mkinstalldirs) $(DESTDIR)$(with_sbin_mountdir)
+       $(mkinstalldirs) $(DESTDIR)$(enable_sbin_mountdir)
        IFS=:; \
-       with_sbin_mount_fs="$(with_sbin_mount_fs)"; \
-       for fs in $$with_sbin_mount_fs; do \
+       enable_sbin_mount_fs="$(enable_sbin_mount_fs)"; \
+       for fs in $$enable_sbin_mount_fs; do \
                if test $$fs != no; then \
-                       $(RM) $(DESTDIR)$(with_sbin_mountdir)/mount.captive-$$fs; \
-                       $(LN_S) mount.captive $(DESTDIR)$(with_sbin_mountdir)/mount.captive-$$fs; \
+                       $(RM) $(DESTDIR)$(enable_sbin_mountdir)/mount.captive-$$fs; \
+                       $(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:
+       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
+install-exec-hook:
+       @true
+
+endif
+enable_sbin_mountPROGRAMS=$(sbin_mount_captive_cond)
+
+EXTRA_DIST+=lufs-captivefs.pod.pl.in
+CLEANFILES+=lufs-captivefs.pod lufs-captivefs.1
+EXTRA_DIST+=mount.captive.pod.pl.in
+CLEANFILES+=mount.captive.pod mount.captive.1
+if ENABLE_MAN_PAGES
+if ENABLE_LUFS
+lufs_captivefs_man_cond=lufs-captivefs.7
+if ENABLE_SBIN_MOUNT
+mount_captive_man_cond=mount.captive.8
+endif
+endif
 endif
-with_sbin_mount_SCRIPTS=$(sbin_mount_captive_cond)
+man_MANS=$(lufs_captivefs_man_cond) $(mount_captive_man_cond)