Initial original import from: fuse-2.4.2-2.fc4
[captive.git] / src / client / lufs / Makefile.am
1 # $Id$
2 # automake source for the liblufs-captive module for lufs Makefile 
3 # Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 include $(top_srcdir)/Makefile-head.am
20 include $(top_srcdir)/src/libcaptive/Makefile-libcaptive.am
21
22 liblufs_captivefs_la_CFLAGS=                   $(GNOME_VFS_CFLAGS) $(LIBXML_CFLAGS)
23 liblufs_captivefs_la_LIBADD=$(captive_library) $(GNOME_VFS_LIBS)
24 liblufs_captivefs_la_LDFLAGS=-release $(VERSION)
25 liblufs_captivefs_la_SOURCES= \
26                 captivefs-attr.c \
27                 captivefs-attr.h \
28                 captivefs-directory.c \
29                 captivefs-file.c \
30                 captivefs-misc.c \
31                 captivefs-misc.h \
32                 captivefs-vfs.c \
33                 captivefs-vfs.h
34
35 if ENABLE_LUFS
36 liblufs_captivefs_la_cond=liblufs-captivefs.la
37 endif
38 lib_LTLIBRARIES+=$(liblufs_captivefs_la_cond)
39
40 if ENABLE_LUFS
41 if ENABLE_SBIN_MOUNT
42 sbin_mount_captive_cond=mount.captive
43
44 install-exec-hook:
45         $(mkinstalldirs) $(DESTDIR)$(enable_sbin_mountdir)
46         IFS=:; \
47         enable_sbin_mount_fs="$(enable_sbin_mount_fs)"; \
48         for fs in $$enable_sbin_mount_fs; do \
49                 if test $$fs != no; then \
50                         $(RM) $(DESTDIR)$(enable_sbin_mountdir)/mount.captive-$$fs; \
51                         $(LN_S) mount.captive $(DESTDIR)$(enable_sbin_mountdir)/mount.captive-$$fs; \
52                 fi; \
53                 done
54         if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \
55                 if test x$(libdir) != x/lib -a x$(libdir) != x/usr/lib && ! grep -q '^$(libdir)$$' /etc/ld.so.conf;then \
56                         echo -n "WARNING: Add '$(libdir)' to your '/etc/ld.so.conf' and run ldconfig(8)! Press ENTER...";read; \
57                 fi; \
58                 ldconfig || echo -n "WARNING: Failed to run ldconfig(8) - run manually! Press ENTER...";read; \
59         fi
60
61 else
62 install-exec-hook:
63         if test `id -u` -eq 0 -a -z "$(DESTDIR)";then \
64                 if test x$(libdir) != x/lib -a x$(libdir) != x/usr/lib && ! grep -q '^$(libdir)$$' /etc/ld.so.conf;then \
65                         echo -n "WARNING: Add '$(libdir)' to your '/etc/ld.so.conf' and run ldconfig(8)! Press ENTER...";read; \
66                 fi; \
67                 ldconfig || echo -n "WARNING: Failed to run ldconfig(8) - run manually! Press ENTER...";read; \
68         fi
69
70
71 endif
72 else
73 install-exec-hook:
74         @true
75
76 endif
77 enable_sbin_mountPROGRAMS=$(sbin_mount_captive_cond)
78
79 EXTRA_DIST+=lufs-captivefs.pod.pl.in
80 CLEANFILES+=lufs-captivefs.pod lufs-captivefs.1
81 EXTRA_DIST+=mount.captive.pod.pl.in
82 CLEANFILES+=mount.captive.pod mount.captive.1
83 if ENABLE_MAN_PAGES
84 if ENABLE_LUFS
85 lufs_captivefs_man_cond=lufs-captivefs.7
86 if ENABLE_SBIN_MOUNT
87 mount_captive_man_cond=mount.captive.8
88 endif
89 endif
90 endif
91 man_MANS=$(lufs_captivefs_man_cond) $(mount_captive_man_cond)