Annotation of embedaddon/libiconv/libcharset/INTEGRATE, revision 1.1.1.2
1.1 misho 1: Integration of this library into your package:
2:
3: * Copy the lib/ sourcefiles (localcharset.c, config.charset, ref-add.sin,
4: ref-del.sin) and the include file (include/localcharset.h) into your
5: package.
6:
1.1.1.2 ! misho 7: * Add the m4/ files (codeset.m4, fcntl_h.m4, glibc21.m4) to your aclocal.m4
! 8: file or, if you are using automake, to your m4/ directory.
1.1 misho 9:
10: * Add the following lines to your configure.ac file:
11:
12: AC_CANONICAL_HOST
13: AM_LANGINFO_CODESET
1.1.1.2 ! misho 14: gl_FCNTL_O_FLAGS
1.1 misho 15: jm_GLIBC21
16: AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
17:
18: and make sure that it sets and AC_SUBSTs the PACKAGE variable.
19:
20: * If you are not using automake, add rules to your Makefile.in:
21:
22: - Augment target "all" by
23: localcharset.o charset.alias ref-add.sed ref-del.sed
24: with special rules for the last three:
25:
26: charset.alias: $(srcdir)/config.charset
27: $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
28: mv t-$@ $@
29:
30: ref-add.sed : $(srcdir)/ref-add.sin
31: sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-$@
32: mv t-$@ $@
33:
34: ref-del.sed : $(srcdir)/ref-del.sin
35: sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-$@
36: mv t-$@ $@
37:
38: - Augment target "install" by
39:
40: if test @GLIBC21@ = no; then \
41: case '@host_os@' in \
42: darwin[56]*) \
43: need_charset_alias=true ;; \
44: darwin* | cygwin* | mingw* | pw32* | cegcc*) \
45: need_charset_alias=false ;; \
46: *) \
47: need_charset_alias=true ;; \
48: esac ; \
49: else \
50: need_charset_alias=false ; \
51: fi ; \
52: if $$need_charset_alias; then \
53: $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
54: fi ; \
55: if test -f $(DESTDIR)$(libdir)/charset.alias; then \
56: sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
57: $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
58: rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
59: else \
60: if $$need_charset_alias; then \
61: sed -f ref-add.sed charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
62: $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
63: rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
64: fi; \
65: fi
66:
67: - Augment target "installdirs" by
68:
69: if test @GLIBC21@ = no; then \
70: case '@host_os@' in \
71: darwin[56]*) \
72: need_charset_alias=true ;; \
73: darwin* | cygwin* | mingw* | pw32* | cegcc*) \
74: need_charset_alias=false ;; \
75: *) \
76: need_charset_alias=true ;; \
77: esac ; \
78: else \
79: need_charset_alias=false ; \
80: fi ; \
81: if $$need_charset_alias; then \
82: $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
83: fi ; \
84:
85: - Augment target "uninstall" by
86:
87: if test -f $(DESTDIR)$(libdir)/charset.alias; then \
88: sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
89: if grep '^# Packages using this file: $$' $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \
90: rm -f $(DESTDIR)$(libdir)/charset.alias; \
91: else \
92: $(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
93: fi; \
94: rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
95: fi
96:
97: - Augment target "clean" by
98:
99: rm -f charset.alias ref-add.sed ref-del.sed
100:
101: * If you are using automake, add rules to your Makefile.am:
102:
103: - Augment the main *_SOURCES variable by
104:
105: localcharset.h localcharset.c
106:
107: - Augment EXTRA_DIST by
108:
109: config.charset ref-add.sin ref-del.sin
110:
111: - Augment target "all-local" by
112:
113: charset.alias ref-add.sed ref-del.sed
114:
115: - Add the lines:
116:
117: charset_alias = $(DESTDIR)$(libdir)/charset.alias
118: charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
119: install-exec-local: all-local
120: test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
121: if test -f $(charset_alias); then \
122: sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
123: $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
124: rm -f $(charset_tmp) ; \
125: else \
126: if test @GLIBC21@ = no; then \
127: sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
128: $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
129: rm -f $(charset_tmp) ; \
130: fi ; \
131: fi
132:
133: uninstall-local: all-local
134: if test -f $(charset_alias); then \
135: sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
136: if grep '^# Packages using this file: $$' $(charset_tmp) \
137: > /dev/null; then \
138: rm -f $(charset_alias); \
139: else \
140: $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
141: fi; \
142: rm -f $(charset_tmp); \
143: fi
144:
145: charset.alias: config.charset
146: $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
147: mv t-$@ $@
148:
149: SUFFIXES = .sed .sin
150: .sin.sed:
151: sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
152: mv t-$@ $@
153:
154: CLEANFILES = charset.alias ref-add.sed ref-del.sed
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>