Hash :
b232cfb0
Author :
Date :
2006-10-18T11:59:29
No need any more to test for setlocale.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
Integration of this library into your package:
* Copy the lib/ sourcefiles (localcharset.c, config.charset, ref-add.sin,
ref-del.sin) and the include file (include/localcharset.h) into your
package.
* Add the m4/ files (codeset.m4, glibc21.m4) to your aclocal.m4 file or, if
you are using automake, to your m4/ directory.
* Add the following lines to your configure.ac file:
AC_CANONICAL_HOST
AM_LANGINFO_CODESET
jm_GLIBC21
AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
and make sure that it sets and AC_SUBSTs the PACKAGE variable.
* If you are not using automake, add rules to your Makefile.in:
- Augment target "all" by
localcharset.o charset.alias ref-add.sed ref-del.sed
with special rules for the last three:
charset.alias: $(srcdir)/config.charset
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
mv t-$@ $@
ref-add.sed : $(srcdir)/ref-add.sin
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-$@
mv t-$@ $@
ref-del.sed : $(srcdir)/ref-del.sin
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-$@
mv t-$@ $@
- Augment target "install" by
test @GLIBC21@ != no || $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
sed -f ref-add.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
$(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
else \
if test @GLIBC21@ = no; then \
sed -f ref-add.sed charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
$(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
fi; \
fi
- Augment target "installdirs" by
test @GLIBC21@ != no || $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
- Augment target "uninstall" by
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
sed -f ref-del.sed $(DESTDIR)$(libdir)/charset.alias > $(DESTDIR)$(libdir)/t-charset.alias; \
if grep '^# Packages using this file: $$' $(DESTDIR)$(libdir)/t-charset.alias > /dev/null; then \
rm -f $(DESTDIR)$(libdir)/charset.alias; \
else \
$(INSTALL_DATA) $(DESTDIR)$(libdir)/t-charset.alias $(DESTDIR)$(libdir)/charset.alias; \
fi; \
rm -f $(DESTDIR)$(libdir)/t-charset.alias; \
fi
- Augment target "clean" by
rm -f charset.alias ref-add.sed ref-del.sed
* If you are using automake, add rules to your Makefile.am:
- Augment the main *_SOURCES variable by
localcharset.h localcharset.c
- Augment EXTRA_DIST by
config.charset ref-add.sin ref-del.sin
- Augment target "all-local" by
charset.alias ref-add.sed ref-del.sed
- Add the lines:
charset_alias = $(DESTDIR)$(libdir)/charset.alias
charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
install-exec-local: all-local
test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir)
if test -f $(charset_alias); then \
sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
else \
if test @GLIBC21@ = no; then \
sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
rm -f $(charset_tmp) ; \
fi ; \
fi
uninstall-local: all-local
if test -f $(charset_alias); then \
sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
if grep '^# Packages using this file: $$' $(charset_tmp) \
> /dev/null; then \
rm -f $(charset_alias); \
else \
$(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
fi; \
rm -f $(charset_tmp); \
fi
charset.alias: config.charset
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
mv t-$@ $@
SUFFIXES = .sed .sin
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
mv t-$@ $@
CLEANFILES = charset.alias ref-add.sed ref-del.sed