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