ICU-1596 use the library suffix for the ICU data library too.

X-SVN-Rev: 7632
This commit is contained in:
Yves Arrouye 2002-02-12 20:04:52 +00:00
parent ca6c659728
commit d395929eff
17 changed files with 300 additions and 216 deletions

View File

@ -176,8 +176,16 @@ u_charName(UChar32 code, UCharNameChoice nameChoice,
}
if(i==0) {
/* normal character name */
length=getName(uCharNames, (uint32_t)code, nameChoice, buffer, (uint16_t)bufferLength);
if (nameChoice == U_UNICODE_EXTENDED_CHAR_NAME) {
/* extended character name */
length=getName(uCharNames, (uint32_t)code, U_UNICODE_CHAR_NAME, buffer, (uint16_t)bufferLength);
if (!length && u_charType(code) == U_CONTROL_CHAR) {
length=getName(uCharNames, (uint32_t)code, U_UNICODE_CHAR_NAME, buffer, (uint16_t)bufferLength);
}
} else {
/* normal character name */
length=getName(uCharNames, (uint32_t)code, nameChoice, buffer, (uint16_t)bufferLength);
}
}
return u_terminateChars(buffer, bufferLength, length, pErrorCode);
@ -1203,3 +1211,12 @@ findNameDummy(void *context,
const char *name, UTextOffset length) {
return FALSE;
}
/*
* Hey, Emacs, please set the following:
*
* Local Variables:
* indent-tabs-mode: nil
* End:
*
*/

View File

@ -89,6 +89,11 @@
/* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */
#define ICU_USE_THREADS @ICU_USE_THREADS@
/* Determine whether to disable renaming or not */
#ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING @U_DISABLE_RENAMING@
#endif
/*===========================================================================*/
/* Platform/Language determination */
/*===========================================================================*/

View File

@ -69,6 +69,11 @@
/* Determines the endianness of the platform */
#define U_IS_BIG_ENDIAN 1
/* Determine whether to disable renaming or not */
#ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING 0
#endif
/*===========================================================================*/
/* Generic data types */
/*===========================================================================*/

View File

@ -57,6 +57,11 @@
/* Determines the endianness of the platform */
#define U_IS_BIG_ENDIAN 0
/* Determine whether to disable renaming or not */
#ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING 0
#endif
/*===========================================================================*/
/* Generic data types */
/*===========================================================================*/

View File

@ -60,6 +60,11 @@
/* 1 or 0 to enable or disable threads. If undefined, default is: enable threads. */
#define ICU_USE_THREADS 1
/* Determine whether to disable renaming or not */
#ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING 0
#endif
/*===========================================================================*/
/* Generic data types */
/*===========================================================================*/

View File

@ -58,6 +58,11 @@
/* Determines the endianness of the platform */
#define U_IS_BIG_ENDIAN 0
/* Determine whether to disable renaming or not */
#ifndef U_DISABLE_RENAMING
#define U_DISABLE_RENAMING 0
#endif
/*===========================================================================*/
/* Generic data types */
/*===========================================================================*/

View File

@ -700,6 +700,7 @@ typedef enum UCellWidth UCellWidth;
enum UCharNameChoice {
U_UNICODE_CHAR_NAME,
U_UNICODE_10_CHAR_NAME,
U_UNICODE_EXTENDED_CHAR_NAME,
U_CHAR_NAME_CHOICE_COUNT
};

View File

@ -21,8 +21,10 @@
#ifndef URENAME_H
#define URENAME_H
#if !U_DISABLE_RENAMING
/* C exports renaming data */
#define T_CString_integerToString T_CString_integerToString_2_0
#define T_CString_stricmp T_CString_stricmp_2_0
#define T_CString_stringToInteger T_CString_stringToInteger_2_0
@ -797,8 +799,10 @@
/* C++ class names renaming defines */
#ifdef XP_CPLUSPLUS
#if !U_HAVE_NAMESPACE
#define AbsoluteValueSubstitution AbsoluteValueSubstitution_2_0
#define AlternateSubstitutionSubtable AlternateSubstitutionSubtable_2_0
#define AnchorTable AnchorTable_2_0
@ -979,6 +983,11 @@
#define UppercaseTransliterator UppercaseTransliterator_2_0
#define ValueRecord ValueRecord_2_0
#define llong llong_2_0
#endif
#endif
#endif
#endif

View File

@ -2,7 +2,7 @@
#******************************************************************************
# Copyright (C) 1999-2001, International Business Machines
# Corporation and others. All Rights Reserved.
# $Revision: 1.23 $
# $Revision: 1.24 $
#******************************************************************************
# This Makefile is designed to be included into projects which make use
# of the ICU.
@ -22,7 +22,7 @@ LIBS = @LIBS@
ICUPREFIX = icu
ICULIBSUFFIX = @ICULIBSUFFIX@
ICULIBS = $(LIBS) -L$(libdir) \
-l$(ICUPREFIX)data \
-l$(ICUPREFIX)data$(ICULIBSUFFIX) \
-l$(ICUPREFIX)i18n$(ICULIBSUFFIX) \
-l$(ICUPREFIX)uc$(ICULIBSUFFIX) \
-l$(ICUPREFIX)toolutil$(ICULIBSUFFIX) \

View File

@ -3,7 +3,7 @@
## Copyright (c) 1999-2001, International Business Machines Corporation and
## others. All Rights Reserved.
##
## $Id: mh-os390,v 1.33 2002/02/12 19:38:27 yves-oss Exp $
## $Id: mh-os390,v 1.34 2002/02/12 20:04:52 yves-oss Exp $
###################################################################
# IMPORTANT NOTE #
@ -81,8 +81,7 @@ BATCH_LIBICUDT= "//'${LOADEXP}(IXMI${SO_TARGET_VERSION_MAJOR}D1)'"
endif
## Link commands to link to ICU libs
#LIBICUDT= $(top_builddir)/data/libicudata.$(SO_TARGET_VERSION).x
LIBICUDT= $(top_builddir)/stubdata/lib$(ICUDATA_NAME)$(BATCH_STUB_SUFFIX).x
LIBICUDT= $(top_builddir)/stubdata/lib$(ICUDATA_NAME)$(ICULIBSUFFIX)$(BATCH_STUB_SUFFIX).x
LIBICUUC= $(top_builddir)/common/li$(ICUPREFIX)uc$(ICULIBSUFFIX).$(SO_TARGET_VERSION).x
LIBICUI18N= $(top_builddir)/i18n/lib$(ICUPREFIX)i18n$(ICULIBSUFFIX).$(SO_TARGET_VERSION).x
LIBICULE= $(top_builddir)/layout/lib$(ICUPREFIX)le$(ICULIBSUFFIX).$(SO_TARGET_VERSION).x

352
icu4c/source/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ dnl Copyright (c) 1999-2000, International Business Machines Corporation and
dnl others. All Rights Reserved.
dnl Stephen F. Booth, heavily modified by Yves and others
dnl $Id: configure.in,v 1.151 2002/01/31 04:24:35 yves-oss Exp $
dnl $Id: configure.in,v 1.152 2002/02/12 20:04:50 yves-oss Exp $
dnl Process this file with autoconf to produce a configure script
AC_INIT(common/unicode/utypes.h)
@ -298,6 +298,21 @@ fi
AC_SUBST(ICU_USE_THREADS)
dnl Check whether to use the renaming or not.
U_DISABLE_RENAMING=0
AC_MSG_CHECKING([whether to enable ICU symbols renaming])
AC_ARG_ENABLE(renaming,
[ --enable-renaming add a version suffix to ICU symbols [default=yes]],
[ case "${enableval}" in
yes|"") enabled=yes;;
no) U_DISABLE_RENAMING=1;;
*) ;;
esac],
[enabled=yes]
)
AC_MSG_RESULT($enabled)
AC_SUBST(U_DISABLE_RENAMING)
dnl Check for mmap()
# The AC_FUNC_MMAP macro doesn't work properly. It seems to be too specific.

View File

@ -42,9 +42,8 @@ SO_TARGET_VERSION_MAJOR = @LIB_VERSION_MAJOR@
ICUDATA_DIR = @pkgicudatadir@/$(PACKAGE)/$(VERSION)
ICUDATA_BASENAME_VERSION = icudt@LIB_VERSION_MAJOR@
ICUDATA_BASENAME_VERSION = $(ICUPREFIX)dt@LIB_VERSION_MAJOR@
ICUDATA_PLATFORM_NAME = $(ICUDATA_BASENAME_VERSION)@ICUDATA_CHAR@
ICUDATA_NAME = icudata
ifeq ($(strip $(PKGDATA_MODE)),)
PKGDATA_MODE=@DATA_PACKAGING_MODE@
endif
@ -53,8 +52,10 @@ ICUDATA_NAME = $(ICUDATA_PLATFORM_NAME)
ICUPKGDATA_DIR = $(ICUDATA_DIR)
else
ifeq ($(PKGDATA_MODE),dll)
ICUDATA_NAME = $(ICUPREFIX)data$(ICULIBSUFFIX)
ICUPKGDATA_DIR = $(libdir)
else
ICUDATA_NAME = $(ICUPREFIX)data
ICUPKGDATA_DIR = $(ICUDATA_DIR)
endif
endif
@ -119,7 +120,7 @@ INSTALL-S = $(INSTALL_PROGRAM)
INSTALL-L = $(INSTALL_DATA)
# Link commands to link to ICU libs
LIBICUDT= -L$(top_builddir)/data -L$(top_builddir)/stubdata -l$(ICUPREFIX)data
LIBICUDT= -L$(top_builddir)/data -L$(top_builddir)/stubdata -l$(ICUPREFIX)data$(ICULIBSUFFIX)
LIBICUUC= -L$(top_builddir)/common -l$(ICUPREFIX)uc$(ICULIBSUFFIX) $(LIBICUDT)
LIBICUI18N= -L$(top_builddir)/i18n -l$(ICUPREFIX)i18n$(ICULIBSUFFIX)
LIBICULE= -L$(top_builddir)/layout -l$(ICUPREFIX)le$(ICULIBSSUFFIX)

View File

@ -33,12 +33,12 @@ ENABLE_STATIC = @ENABLE_STATIC@
ENABLE_SHARED = @ENABLE_SHARED@
ifneq ($(ENABLE_STATIC),)
TARGET = libicudata.a
TARGET = lib$(ICUPREFIX)data$(ICULIBSUFFIX).a
RANLIB = @RANLIB@
endif
ifneq ($(ENABLE_SHARED),)
SO_TARGET = libicudata.$(SO)
SO_TARGET = lib$(ICUPREFIX)data$(ICULIBSUFFIX).$(SO)
ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(BATCH_STUB_TARGET)
endif

View File

@ -131,34 +131,33 @@ main(int argc, char* argv[]) {
argc=-1;
}
if(argc<0 || options[0].doesOccur || options[1].doesOccur) {
FILE *where = argc < 0 ? stderr : stdout;
/*
* Broken into chucks because the C89 standard says the minimum
* required supported string length is 509 bytes.
*/
fprintf(stderr,
"usage: %s [-options] maxsize [list-filename]\n"
"\n"
"Read the list file (default: stdin) and \n"
"create a common data file from specified files; omit any larger than maxsize\n"
"\n",
argv[0]);
fprintf(stderr,
" option parameter description\n"
" ---------------------------------------------------------------------------\n"
" -h or -? or --help this usage text\n"
" -v or --verbose verbose output\n"
" -c or --copyright include the ICU copyright notice\n"
" -C or --comment \"text\" include a comment string\n"
" -d or --destdir dir destination directory\n");
fprintf(stderr,
" -n or --name file-name output file name, without .type extension\n"
" defaults to " COMMON_DATA_NAME "\n"
" -t or --type file-type type of the destination file\n"
" defaults to \"" DATA_TYPE "\"\n"
" -S or --source toc-file write a .c source file with the table of contents\n"
" -e or --entrypoint name override the c entrypoint name\n"
" defaults to \"<name>_<type>\" ");
fprintf(where,
"%csage: %s [ -h, -?, --help ] [ -v, --verbose ] [ -c, --copyright ] [ -C, --comment comment ] [ -d, --destdir dir ] [ -n, --name filename ] [ -t, --type filetype ] [ -C, --source tocfile ] [ -e, --entrypoint name ] [ maxsize ] [ [ -f ] filename ]\n", argc < 0 ? 'u' : 'U', *argv);
if (argc >= 0) {
fprintf(where, "\n"
"Read the list file (default: standard input) and create a common data\n"
"file from specified files; omit any larger than maxsize.\n");
fprintf(where, "\n"
"Options: -h, -?, --help this usage text\n"
" -v, --verbose verbose output\n"
" -c, --copyright include the ICU copyright notice\n"
" -C, --comment comment include a comment string\n"
" -d, --destdir dir destination directory\n");
fprintf(where,
" -n --name filename output filename, without .type extension\n"
" defaults to " COMMON_DATA_NAME "\n"
" -t, --type filetype type of the destination file\n"
" defaults to \"" DATA_TYPE "\"\n"
" -S, --source tocfile write a .c source file with the table of contents\n"
" -e, --entrypoint name override the c entrypoint name\n"
" defaults to \"<name>_<type>\" ");
}
return argc<0 ? U_ILLEGAL_ARGUMENT_ERROR : U_ZERO_ERROR;
}

View File

@ -71,8 +71,8 @@ important to make sure that it is present if
.B ICU_DATA
is set.
.SH FILES
.TP \w'\fB@thesysconfdir@/icu/convrtrs.txt'u+3n
.B @thesysconfdir@/icu/convrtrs.txt
.TP \w'\fB@thesysconfdir@/@PACKAGE@/convrtrs.txt'u+3n
.B @thesysconfdir@/@PACKAGE@/convrtrs.txt
Description of ICU's converters and their aliases.
.SH VERSION
@VERSION@

View File

@ -81,6 +81,8 @@ print HEADER <<"EndOfHeaderComment";
#ifndef $HEADERDEF
#define $HEADERDEF
#if !U_DISABLE_RENAMING
EndOfHeaderComment
for(;@ARGV; shift(@ARGV)) {
@ -123,20 +125,21 @@ for(;@ARGV; shift(@ARGV)) {
}
}
print HEADER "\n/* C exports renaming data */\n";
print HEADER "\n/* C exports renaming data */\n\n";
foreach(sort keys(%CFuncs)) {
print HEADER "#define $_ $_$U_ICU_VERSION_SUFFIX\n";
}
print HEADER "\n/* C++ class names renaming defines */\n";
print HEADER "\n/* C++ class names renaming defines */\n\n";
print HEADER "#ifdef XP_CPLUSPLUS\n";
print HEADER "#if !U_HAVE_NAMESPACE\n";
print HEADER "#if !U_HAVE_NAMESPACE\n\n";
foreach(sort keys(%CppClasses)) {
print HEADER "#define $_ $_$U_ICU_VERSION_SUFFIX\n";
}
print HEADER "\n#endif\n";
print HEADER "#endif\n";
print HEADER "#endif\n";
print HEADER "#endif\n";
print HEADER "\n#endif\n";
print HEADER "\n#endif\n";
close HEADER;
@ -163,10 +166,3 @@ EndHelpText
}