diff --git a/icu4c/source/Makefile.in b/icu4c/source/Makefile.in
index c9219f1ed78..9ffb3d80709 100644
--- a/icu4c/source/Makefile.in
+++ b/icu4c/source/Makefile.in
@@ -38,7 +38,7 @@ include @platform_make_fragment@
 CLEANFILES = *~ 
 
 DOCDIRS = common i18n
-SUBDIRS =  common i18n $(EXTRA) $(LAYOUT) tools data $(TEST) $(SAMPLE)
+SUBDIRS =  stubdata common i18n $(EXTRA) $(LAYOUT) tools data $(TEST) $(SAMPLE)
 
 ## Extra files to install [nothing at present]
 EXTRA_DATA =
diff --git a/icu4c/source/common/Makefile.in b/icu4c/source/common/Makefile.in
index aad38bdcd73..c8031cfd127 100644
--- a/icu4c/source/common/Makefile.in
+++ b/icu4c/source/common/Makefile.in
@@ -61,8 +61,10 @@ ENABLE_RPATH = @ENABLE_RPATH@
 ifeq ($(ENABLE_RPATH),YES)
 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
 endif
+
+# todo:  need t make $(LIBICUDT) conditional on using dll-based data.
 LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
-LIBS = @LIBS@
+LIBS = $(LIBICUDT) @LIBS@
 
 # Data packaging options are set at configure time with --with-data-packaging.
 CPPFLAGS += @DATA_PACKAGING_CPPFLAGS@
diff --git a/icu4c/source/common/udata.c b/icu4c/source/common/udata.c
index af7993ff45e..c5c9cae8090 100644
--- a/icu4c/source/common/udata.c
+++ b/icu4c/source/common/udata.c
@@ -21,6 +21,7 @@
 #include "cstring.h"
 #include "unicode/udata.h"
 #include "unicode/uversion.h"
+#include "uhash.h"
 
 #ifdef OS390
 #include <stdlib.h>
@@ -236,8 +237,8 @@ static UBool s390dll = TRUE;
    therefore they are defined later
  */
 
-#define MAP_WIN32 1
-#define MAP_POSIX 2
+#define MAP_WIN32       1
+#define MAP_POSIX       2
 #define MAP_FILE_STREAM 3
 
 #ifdef WIN32
@@ -283,34 +284,37 @@ static UBool s390dll = TRUE;
 
 /* constants for UDataMemory flags: type of data memory */
 enum {
-    NO_DATA_MEMORY,
-    FLAT_DATA_MEMORY,
-    DLL_DATA_MEMORY
+    NO_DATA_MEMORY   = 0,
+    FLAT_DATA_MEMORY = 1,
+    DLL_DATA_MEMORY  = 2
 };
+#define DATA_MEMORY_TYPE_MASK    0xf
 
 /* constants for UDataMemory flags: type of TOC */
 enum {
-    NO_TOC,
-    OFFSET_TOC,
-    POINTER_TOC,
-    DLL_INTRINSIC_TOC
+    NO_TOC              =0x00,
+    OFFSET_TOC          =0x10,
+    POINTER_TOC         =0x20,
+    DLL_INTRINSIC_TOC   =0x30
 };
+#define TOC_TYPE_MASK            0xf0
 
 /* constants for UDataMemory flags: type of TOC */
-#define DATA_MEMORY_TYPE_MASK 0xf
-#define TOC_TYPE_SHIFT 4
-#define TOC_TYPE_MASK 0xf
-#define SET_DATA_POINTER_SHIFT 30
-#define DYNAMIC_DATA_MEMORY_SHIFT 31
+#define SET_DATA_POINTER_FLAG     0x40000000
+#define DYNAMIC_DATA_MEMORY_FLAG  0x80000000
 
-typedef struct {
-    uint16_t headerSize;
-    uint8_t magic1, magic2;
+#define IS_DATA_MEMORY_LOADED(pData) ((pData)->flags!=0)
+
+
+typedef struct  {
+    uint16_t    headerSize;
+    uint8_t     magic1;
+    uint8_t     magic2;
 } MappedData;
 
-typedef struct {
-    MappedData dataHeader;
-    UDataInfo info;
+typedef struct  {
+    MappedData  dataHeader;
+    UDataInfo   info;
 } DataHeader;
 
 typedef const DataHeader *
@@ -319,67 +323,90 @@ LookupFn(const UDataMemory *pData,
          const char *dllEntryName,
          UErrorCode *pErrorCode);
 
-struct UDataMemory {
-    UDataMemory *parent;
-    Library lib;
-    MemoryMap map;
-    LookupFn *lookupFn;
-    const void *toc;
-    const DataHeader *pHeader;
-    uint32_t flags;
-    int32_t refCount;
-};
+/*----------------------------------------------------------------------------------*
+ *                                                                                  *
+ *  UDataMemory     Very Important Struct.  Pointers to these are returned          *
+ *                  to callers from the various data open functions.                *
+ *                  These keep track of everything about the memeory                *
+ *                                                                                  *
+ *----------------------------------------------------------------------------------*/
+typedef struct UDataMemory {
+    UDataMemory      *parent;      /*  Set if we're suballocated from some common     */
+    Library           lib;         /* OS dependent handle for DLLs, .so, etc          */
+    MemoryMap         map;         /* Handle, or whatever.  OS dependent.             */
+    LookupFn         *lookupFn;
+    const void       *toc;         /* For common memory, to find pieces within.       */
+    const DataHeader *pHeader;     /* Header.  For common data, header is at top of file */
+    uint32_t          flags;       /* Memory format, TOC type, Allocation type, etc.  */
+    int32_t           refCount;    /* Not used just yet...                            */
+} UDataMemory;
 
-#define IS_DATA_MEMORY_LOADED(pData) ((pData)->flags!=0)
 
+static void UDataMemory_init(UDataMemory *This) {  
+    uprv_memset(This, 0, sizeof(UDataMemory));
+}
+
+
+static void UDataMemory_copy(UDataMemory *dest, UDataMemory *source) {
+    uprv_memcpy(dest, source, sizeof(UDataMemory));
+}
+
+static UDataMemory *UDataMemory_createNewInstance() {
+    UDataMemory *This;
+    This = uprv_malloc(sizeof(UDataMemory));
+    UDataMemory_init(This);
+    return This;
+}
+
+/*----------------------------------------------------------------------------------*
+ *                                                                                  *
+ *  Pointer TOCs.   This form of table-of-contents should be removed because        *
+ *                  DLLs must be relocated on loading to correct the pointer values *
+ *                  and this operation makes shared memory mapping of the data      *
+ *                  much less likely to work.                                       *
+ *                                                                                  *
+ *----------------------------------------------------------------------------------*/
 typedef struct {
     const char *entryName;
     const DataHeader *pHeader;
 } PointerTOCEntry;
 
-/* memory-mapping base functions -------------------------------------------- */
 
+/*----------------------------------------------------------------------------------*
+ *                                                                                  *
+ *   Memory Mapped File support.  Platform dependent implementation of functions    *
+ *                                used by the rest of the implementation.           *
+ *                                                                                  *
+ *----------------------------------------------------------------------------------*/
 #if MAP_IMPLEMENTATION==MAP_WIN32
     static UBool
-    uprv_mapFile(UDataMemory *pData, const char *path, const char *basename) {
-        char buffer[200];
+    uprv_mapFile(
+         UDataMemory *pData,    /* Fill in with info on the result doing the mapping. */
+                                /*   Output only; any original contents are cleared.  */
+         const char *path       /* File path to be opened/mapped                      */
+         ) 
+    {
         HANDLE map;
-        char *p;
+        HANDLE file;
+        
+        UDataMemory_init(pData); /* Clear the output struct.        */
 
-        /* set up the mapping name and the filename */
-        uprv_strcpy(buffer, "icu" U_ICU_VERSION " ");
-        uprv_strcat(buffer, path);
-
-        /* replace in buffer \ with /   */
-        for(p=buffer; *p; p++) {
-            if (*p == '\\') {
-                *p = '/';
-            }
+        /* open the input file */
+        file=CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL,
+            OPEN_EXISTING,
+            FILE_ATTRIBUTE_NORMAL|FILE_FLAG_RANDOM_ACCESS, NULL);
+        if(file==INVALID_HANDLE_VALUE) {
+            return FALSE;
         }
-
-        /* open the mapping */
-        map=OpenFileMapping(FILE_MAP_READ, FALSE, buffer);
+        
+        /* create an unnamed Windows file-mapping object for the specified file */
+        map=CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL);
+        CloseHandle(file);
         if(map==NULL) {
-            /* the mapping has not been created */
-            HANDLE file;
-
-            /* open the input file */
-            file=CreateFile(path, GENERIC_READ, FILE_SHARE_READ, NULL,
-                            OPEN_EXISTING,
-                            FILE_ATTRIBUTE_NORMAL|FILE_FLAG_RANDOM_ACCESS, NULL);
-            if(file==INVALID_HANDLE_VALUE) {
-                return FALSE;
-            }
-
-            /* create the mapping */
-            map=CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, buffer);
-            CloseHandle(file);
-            if(map==NULL) {
-                return FALSE;
-            }
+            return FALSE;
         }
-
-        /* get a view of the mapping */
+        
+        /* map a view of the file into our address space */
         pData->pHeader=(const DataHeader *)MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
         if(pData->pHeader==NULL) {
             CloseHandle(map);
@@ -390,6 +417,7 @@ typedef struct {
         return TRUE;
     }
 
+
     static void
     uprv_unmapFile(UDataMemory *pData) {
         if(pData!=NULL && pData->map!=NULL) {
@@ -402,12 +430,14 @@ typedef struct {
 
 #elif MAP_IMPLEMENTATION==MAP_POSIX
     static UBool
-    uprv_mapFile(UDataMemory *pData, const char *path, const char *basename) {
+    uprv_mapFile(UDataMemory *pData, const char *path) {
         int fd;
         int length;
         struct stat mystat;
         const void *data;
 
+        UDataMemory_init(pData); /* Clear the output struct.        */
+
         /* determine the length of the file */
         if(stat(path, &mystat)!=0 || mystat.st_size<=0) {
             return FALSE;
@@ -462,11 +492,12 @@ typedef struct {
 
 #elif MAP_IMPLEMENTATION==MAP_FILE_STREAM
     static UBool
-    uprv_mapFile(UDataMemory *pData, const char *path, const char *basename) {
+    uprv_mapFile(UDataMemory *pData, const char *path) {
         FileStream *file;
         int32_t fileLength;
         void *p;
 
+        UDataMemory_init(pData); /* Clear the output struct.        */
         /* open the input file */
         file=T_FileStream_open(path, "rb");
         if(file==NULL) {
@@ -513,8 +544,13 @@ typedef struct {
 #   error MAP_IMPLEMENTATION is set incorrectly
 #endif
 
-/* entry point lookup implementations --------------------------------------- */
 
+    
+/*----------------------------------------------------------------------------------*
+ *                                                                                  *
+ *    entry point lookup implementations                                            *
+ *                                                                                  *
+ *----------------------------------------------------------------------------------*/
 static const DataHeader *
 normalizeDataPointer(const DataHeader *p) {
     /* allow the data to be optionally prepended with an alignment-forcing double value */
@@ -658,7 +694,7 @@ setCommonICUData(UDataMemory *pData) {
     umtx_lock(NULL);
     if(!IS_DATA_MEMORY_LOADED(&commonICUData)) {
         uprv_memcpy(&commonICUData, pData, sizeof(UDataMemory));
-        commonICUData.flags&=~(1UL<<DYNAMIC_DATA_MEMORY_SHIFT);
+        commonICUData.flags&=~DYNAMIC_DATA_MEMORY_FLAG;
         uprv_memset(pData, 0, sizeof(UDataMemory));
         setThisLib=TRUE;
     }
@@ -679,10 +715,19 @@ strcpy_returnEnd(char *dest, const char *src) {
     return dest;
 }
 
+/*------------------------------------------------------------------------------*
+ *                                                                              *
+ *  setPathGetBasename   given a (possibly partial) path of an item             *
+ *                       to be opened, compute a full directory path and leave  *
+ *                       it in pathBuffer.  Returns a pointer to the null at    *
+ *                       the end of the computed path.                          *
+ *                       If a non-empty path buffer is passed in, assume that   *
+ *                       it already contains the right result, and don't        *
+ *                       bother to figure it all out again.                     *
+ *                                                                              *
+ *------------------------------------------------------------------------------*/
 static char *
 setPathGetBasename(const char *path, char *pathBuffer) {
-    /* set up the path in the pathBuffer and return a pointer behind its end,
-       to where the basename will go */
     if(*pathBuffer!=0) {
         /* the pathBuffer is already filled,
            we just need to find the basename position;
@@ -731,6 +776,96 @@ findBasename(const char *path) {
 }
 
 
+/*----------------------------------------------------------------------*
+ *                                                                      *
+ *   Cache for common data                                              *
+ *      Functions for looking up or adding entries to a cache of        *
+ *      data that has been previously opened.  Avoids a potentially     *
+ *      expensive operation of re-opening the data for subsequent       *
+ *      uses.                                                           *
+ *                                                                      *
+ *      Data remains cached for the duration of the process.            *
+ *                                                                      *
+ *----------------------------------------------------------------------*/
+
+typedef struct DataCacheElement {
+    char          *path;
+    UDataMemory    item;
+} DataCacheElement;
+ 
+ /*   udata_getCacheHashTable()
+ *     Get the hash table used to store the data cache entries.
+ *     Lazy create it if it doesn't yet exist.
+ */  
+static UHashtable *udata_getHashTable() {
+    static UHashtable *gHashTable;
+    UErrorCode err = U_ZERO_ERROR;
+
+    if (gHashTable != NULL) {
+        return gHashTable;
+    }
+    umtx_lock(NULL); 
+    if (gHashTable == NULL) {
+        gHashTable = uhash_open(uhash_hashChars, uhash_compareChars, &err);
+    }
+    umtx_unlock(NULL);
+
+    if U_FAILURE(err) {
+        return NULL;
+    }
+    return gHashTable;
+}
+
+
+
+static UDataMemory *udata_findCachedData(const char *path)
+{
+    UHashtable   *htable;
+    UDataMemory  *retVal;
+
+    umtx_lock(NULL); 
+    htable = udata_getHashTable();
+    umtx_unlock(NULL);
+    retVal = (UDataMemory *)uhash_get(htable, path);
+    return retVal;
+}
+
+
+static UDataMemory *udata_cacheDataItem(const char *path, UDataMemory *item) {
+    DataCacheElement *newElement;
+    int               pathLen;
+    UErrorCode        err = U_ZERO_ERROR;
+
+    /* Create a new DataCacheElement - the thingy we store in the hash table -
+     * and copy the supplied path and UDataMemoryItems into it.
+     */
+    newElement = uprv_malloc(sizeof(DataCacheElement));
+    UDataMemory_copy(&newElement->item, item);
+    newElement->item.flags &= ~DYNAMIC_DATA_MEMORY_FLAG;
+    pathLen = uprv_strlen(path);
+    newElement->path = uprv_malloc(pathLen+1);
+    uprv_strcpy(newElement->path, path);
+
+    /* Stick the new DataCacheElement into the hash table.
+    */
+    umtx_lock(NULL); 
+    uhash_put(udata_getHashTable(), 
+        newElement->path,               /* Key   */
+        &newElement->item,              /* Value */
+        &err);
+    umtx_unlock(NULL);
+              /*  Just ignore any error returned.
+               *  1.  Failure to add to the cache is not, by itself, fatal.
+               *  2.  The only reason the hash table would fail is if memory
+               *      allocation fails, which means complete death is just
+               *      around the corner anyway...
+               */
+
+    return &newElement->item;
+}
+
+
+
 /*                                                                     */
 /*  Add a static reference to the common data from a library if the    */
 /*      build options are set to request it.                           */
@@ -740,24 +875,51 @@ findBasename(const char *path) {
 extern  const DataHeader U_IMPORT U_ICUDATA_ENTRY_POINT;
 #endif
 
+
+/*----------------------------------------------------------------------*
+ *                                                                      *
+ *   openCommonData   Attempt to open a common format (.dat) file       *
+ *                    Map it into memory (if it's not there already)    *
+ *                    and return a UDataMemory object for it.           *
+ *                    The UDataMemory object will either be heap or     *
+ *                    global - in either case, it is permanent and can  *
+ *                    be safely passed back the chain of callers.       *
+ *                                                                      *
+ *----------------------------------------------------------------------*/
 static UDataMemory *
-openCommonData(UDataMemory *pData,
-               const char *path, UBool isICUData,
-               char *pathBuffer,
-               UErrorCode *pErrorCode) {
+openCommonData(
+               const char *path,          /*  Path from OpenCHoice?          */
+               UBool isICUData,           /*  ICU Data true if path == NULL  */
+               UErrorCode *pErrorCode)
+ {
     const char *inBasename;
     char *basename, *suffix;
     const DataHeader *pHeader;
+    char pathBuffer[1024];
+    UDataMemory   tData;
+
+    UDataMemory_init(&tData);
+
 
     /* "mini-cache" for common ICU data */
     if(isICUData && IS_DATA_MEMORY_LOADED(&commonICUData)) {
         return &commonICUData;
     }
 
-    /* ### we should have a real cache with a UHashTable and the path as the key */
 
-#if defined(UDATA_STATIC_LIB) || defined(UDATA_DLL)
+    /* Is this data cached?  Meaning, have we seen this before  */
+    if (!isICUData) {
+        UDataMemory  *dataToReturn = udata_findCachedData(path);
+        if (dataToReturn != NULL) {
+            return dataToReturn;
+        }
+    }
+
+
     if (isICUData) {
+        /* ICU common data is already in our address space, thanks to a static reference */
+        /*   to a symbol from the data library.  Just follow that pointer to set up      */
+        /*   our ICU data.                                                               */
         pHeader = &U_ICUDATA_ENTRY_POINT;
         if(!(pHeader->dataHeader.magic1==0xda && pHeader->dataHeader.magic2==0x27 &&
             pHeader->info.isBigEndian==U_IS_BIG_ENDIAN &&
@@ -775,10 +937,10 @@ openCommonData(UDataMemory *pData,
             pHeader->info.formatVersion[0]==1
             ) {
             /* dataFormat="CmnD" */
-            pData->lib=NULL;
-            pData->lookupFn=offsetTOCLookupFn;
-            pData->toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
-            pData->flags=DLL_DATA_MEMORY|OFFSET_TOC<<TOC_TYPE_SHIFT;
+            tData.lib=NULL;
+            tData.lookupFn=offsetTOCLookupFn;
+            tData.toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
+            tData.flags= DLL_DATA_MEMORY | OFFSET_TOC;
         } else if(pHeader->info.dataFormat[0]==0x54 &&
             pHeader->info.dataFormat[1]==0x6f &&
             pHeader->info.dataFormat[2]==0x43 &&
@@ -786,10 +948,10 @@ openCommonData(UDataMemory *pData,
             pHeader->info.formatVersion[0]==1
             ) {
             /* dataFormat="ToCP" */
-            pData->lib=NULL;
-            pData->lookupFn=pointerTOCLookupFn;
-            pData->toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
-            pData->flags=DLL_DATA_MEMORY|POINTER_TOC<<TOC_TYPE_SHIFT;
+            tData.lib=NULL;
+            tData.lookupFn=pointerTOCLookupFn;
+            tData.toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
+            tData.flags=DLL_DATA_MEMORY|POINTER_TOC;
         } else {
             /* dataFormat not recognized */
             *pErrorCode=U_INVALID_FORMAT_ERROR;
@@ -797,23 +959,16 @@ openCommonData(UDataMemory *pData,
         }
 
         /* we have common data from a DLL */
-        setCommonICUData(pData);
+        setCommonICUData(&tData);
         return &commonICUData;
     }
 
 
-#endif     /*UDATA_STATIC_LIB*/
-
-
 
     /* set up path and basename */
+    pathBuffer[0] = 0;
     basename=setPathGetBasename(path, pathBuffer);
     if(isICUData) {
-#ifdef OS390
-      if (s390dll)
-        inBasename=COMMON_DATA1_NAME;
-      else
-#endif
         inBasename=COMMON_DATA_NAME;
     } else {
         inBasename=findBasename(path);
@@ -825,134 +980,21 @@ openCommonData(UDataMemory *pData,
     }
 
 
-    /*                                                      */
-    /*  Deprecated code to dynamically load a DLL.          */
-    /*                                                      */
-
-    /* try to load a common data DLL */
-#   if !UDATA_NO_DLL
-    {
-        Library lib;
-        /* set up the library name */
-#       ifndef LIB_PREFIX
-        suffix=strcpy_returnEnd(basename, inBasename);
-#       else
-        uprv_memcpy(basename, LIB_PREFIX, LIB_PREFIX_LENGTH);
-        suffix=strcpy_returnEnd(basename+LIB_PREFIX_LENGTH, inBasename);
-#       endif
-        uprv_strcpy(suffix, LIB_SUFFIX);
-
-        /* try path/basename first */
-#       ifdef OS390BATCH
-        /* ### hack: we still need to get u_getDataDirectory() fixed
-        for OS/390 (batch mode - always return "//"? )
-        and this here straightened out with LIB_PREFIX and LIB_SUFFIX (both empty?!)
-        This is probably due to the strange file system on OS/390.  It's more like
-        a database with short entry names than a typical file system. */
-        if (s390dll) {
-            lib=LOAD_LIBRARY("//IXMICUD1", "//IXMICUD1");
-        }
-        else {
-            /* U_ICUDATA_NAME should always have the correct name */
-            /* 390port: BUT FOR BATCH MODE IT IS AN EXCEPTION ... */
-            /* 390port: THE NEXT LINE OF CODE WILL NOT WORK !!!!! */
-            /*lib=LOAD_LIBRARY("//" U_ICUDATA_NAME, "//" U_ICUDATA_NAME);*/
-            lib=LOAD_LIBRARY("//IXMICUDA", "//IXMICUDA"); /*390port*/
-        }
-#       else
-        lib=LOAD_LIBRARY(pathBuffer, basename);
-#       endif
-        if(!IS_LIBRARY(lib) && basename!=pathBuffer) {
-            /* try basename only next */
-            lib=LOAD_LIBRARY(basename, basename);
-        }
-
-        if(IS_LIBRARY(lib)) {
-            /* we have a data DLL - what kind of lookup do we need here? */
-            char entryName[100];
-            *basename=0;
-
-            /* try to find the Table of Contents */
-#if 0
-            if(uprv_strcmp(inBasename, U_ICUDATA_NAME) == 0) {
-                uprv_strcpy(entryName, "icudata");
-            } else {
-                uprv_strcpy(entryName, inBasename);
-            }
-#endif
-            uprv_strcpy(entryName, inBasename);
-
-            uprv_strcat(entryName, "_" DATA_TYPE);
-            pHeader=normalizeDataPointer((const DataHeader *)GET_LIBRARY_ENTRY(lib, entryName));
-            if(pHeader==NULL) {
-                /* no TOC: assume DLL-intrinsic lookup */
-                pData->lib=lib;
-                pData->lookupFn=dllTOCLookupFn;
-                pData->flags=DLL_DATA_MEMORY|DLL_INTRINSIC_TOC<<TOC_TYPE_SHIFT;
-            } else if(!(pHeader->dataHeader.magic1==0xda && pHeader->dataHeader.magic2==0x27 &&
-                pHeader->info.isBigEndian==U_IS_BIG_ENDIAN &&
-                pHeader->info.charsetFamily==U_CHARSET_FAMILY)
-                ) {
-                /* header not valid */
-                UNLOAD_LIBRARY(lib);
-                *pErrorCode=U_INVALID_FORMAT_ERROR;
-                return NULL;
-
-                /* which TOC type? */
-            } else if(pHeader->info.dataFormat[0]==0x43 &&
-                pHeader->info.dataFormat[1]==0x6d &&
-                pHeader->info.dataFormat[2]==0x6e &&
-                pHeader->info.dataFormat[3]==0x44 &&
-                pHeader->info.formatVersion[0]==1
-                ) {
-                /* dataFormat="CmnD" */
-                pData->lib=lib;
-                pData->lookupFn=offsetTOCLookupFn;
-                pData->toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
-                pData->flags=DLL_DATA_MEMORY|OFFSET_TOC<<TOC_TYPE_SHIFT;
-            } else if(pHeader->info.dataFormat[0]==0x54 &&
-                pHeader->info.dataFormat[1]==0x6f &&
-                pHeader->info.dataFormat[2]==0x43 &&
-                pHeader->info.dataFormat[3]==0x50 &&
-                pHeader->info.formatVersion[0]==1
-                ) {
-                /* dataFormat="ToCP" */
-                pData->lib=lib;
-                pData->lookupFn=pointerTOCLookupFn;
-                pData->toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
-                pData->flags=DLL_DATA_MEMORY|POINTER_TOC<<TOC_TYPE_SHIFT;
-            } else {
-                /* dataFormat not recognized */
-                UNLOAD_LIBRARY(lib);
-                *pErrorCode=U_INVALID_FORMAT_ERROR;
-                return NULL;
-            }
-
-            /* we have common data from a DLL */
-            if(isICUData) {
-                setCommonICUData(pData);
-                return &commonICUData;
-            } else {
-                return pData;
-            }
-        }
-    }
-#endif    /* !UDATA_NO_DLL */
 
     /* try to map a common data file */
 
     /* set up the file name */
     suffix=strcpy_returnEnd(basename, inBasename);
-    uprv_strcpy(suffix, "." DATA_TYPE);
+    uprv_strcpy(suffix, "." DATA_TYPE);      /*  DATA_TYPE is ".dat" */
 
     /* try path/basename first, then basename only */
-    if( uprv_mapFile(pData, pathBuffer, basename) ||
-        (basename!=pathBuffer && uprv_mapFile(pData, basename, basename))
+    if( uprv_mapFile(&tData, pathBuffer) ||
+        (basename!=pathBuffer && uprv_mapFile(&tData, basename))
         ) {
         *basename=0;
 
         /* we have mapped a file, check its header */
-        pHeader=pData->pHeader;
+        pHeader=tData.pHeader;
         if(!(pHeader->dataHeader.magic1==0xda && pHeader->dataHeader.magic2==0x27 &&
             pHeader->info.isBigEndian==U_IS_BIG_ENDIAN &&
             pHeader->info.charsetFamily==U_CHARSET_FAMILY &&
@@ -962,21 +1004,24 @@ openCommonData(UDataMemory *pData,
             pHeader->info.dataFormat[3]==0x44 &&
             pHeader->info.formatVersion[0]==1)
             ) {
-            uprv_unmapFile(pData);
-            pData->flags=0;
+            uprv_unmapFile(&tData);
+            tData.flags=0;
             *pErrorCode=U_INVALID_FORMAT_ERROR;
             return NULL;
         }
 
         /* we have common data from a mapped file */
-        pData->lookupFn=offsetTOCLookupFn;
-        pData->toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
-        pData->flags|=OFFSET_TOC<<TOC_TYPE_SHIFT;
+        tData.lookupFn=offsetTOCLookupFn;
+        tData.toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
+        tData.flags|=OFFSET_TOC;
         if(isICUData) {
-            setCommonICUData(pData);
+            setCommonICUData(&tData);
             return &commonICUData;
         } else {
-            return pData;
+            // Cache the UDataMemory struct for this .dat file,
+            //   so we won't need to hunt it down and open it again next time
+            //   something is needed from it.
+            return udata_cacheDataItem(path, &tData);
         }
     }
 
@@ -1025,7 +1070,7 @@ udata_setCommonData(const void *data, UErrorCode *pErrorCode) {
             /* dataFormat="CmnD" */
             dataMemory.lookupFn=offsetTOCLookupFn;
             dataMemory.toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
-            dataMemory.flags=DLL_DATA_MEMORY|OFFSET_TOC<<TOC_TYPE_SHIFT;
+            dataMemory.flags=DLL_DATA_MEMORY|OFFSET_TOC;
         } else if(pHeader->info.dataFormat[0]==0x54 &&
                   pHeader->info.dataFormat[1]==0x6f &&
                   pHeader->info.dataFormat[2]==0x43 &&
@@ -1035,7 +1080,7 @@ udata_setCommonData(const void *data, UErrorCode *pErrorCode) {
             /* dataFormat="ToCP" */
             dataMemory.lookupFn=pointerTOCLookupFn;
             dataMemory.toc=(const char *)pHeader+pHeader->dataHeader.headerSize;
-            dataMemory.flags=DLL_DATA_MEMORY|POINTER_TOC<<TOC_TYPE_SHIFT;
+            dataMemory.flags=DLL_DATA_MEMORY|POINTER_TOC;
         } else {
             /* dataFormat not recognized */
             *pErrorCode=U_INVALID_FORMAT_ERROR;
@@ -1043,7 +1088,7 @@ udata_setCommonData(const void *data, UErrorCode *pErrorCode) {
         }
 
         /* we have common data */
-        dataMemory.flags|=1UL<<SET_DATA_POINTER_SHIFT;
+        dataMemory.flags|=SET_DATA_POINTER_FLAG;
         setCommonICUData(&dataMemory);
         if(dataMemory.flags!=0) {
             /* some thread passed us */
@@ -1052,6 +1097,21 @@ udata_setCommonData(const void *data, UErrorCode *pErrorCode) {
     }
 }
 
+
+
+
+/*---------------------------------------------------------------------------
+ *
+ *  udata_setAppData
+ *
+ *---------------------------------------------------------------------------- */
+
+U_CAPI void U_EXPORT2 
+udata_setAppData(const char *path, const void *data, UErrorCode *err)
+{
+};
+
+
 /* main data loading function ----------------------------------------------- */
 
 static void
@@ -1097,67 +1157,10 @@ doOpenChoice(const char *path, const char *type, const char *name,
     /* set up the ToC names for DLL and offset-ToC lookups */
     setEntryNames(type, name, tocEntryName, dllEntryName);
 
-#ifdef OS390
-    if(s390dll == TRUE)
-    {
-        /* try to get high frequency S390 common data first */
-        uprv_memset(&dataMemory, 0, sizeof(UDataMemory));
-        pathBuffer[0]=0;
-        pCommonData=openCommonData(&dataMemory, path, isICUData, pathBuffer, &errorCode);
-        if(U_SUCCESS(errorCode)) {
-            /* look up the data piece in the common data */
-            pHeader=pCommonData->lookupFn(pCommonData, tocEntryName, dllEntryName, &errorCode);
-            if(pHeader!=NULL) {
-                /* data found in the common data, test it */
-                if(pHeader->dataHeader.magic1==0xda && pHeader->dataHeader.magic2==0x27 &&
-                   pHeader->info.isBigEndian==U_IS_BIG_ENDIAN &&
-                   (isAcceptable==NULL || isAcceptable(context, type, name, &pHeader->info))
-                ) {
-                    /* acceptable - allocate parent, too, if necessary */
-                    if(pCommonData==&dataMemory) {
-                        /* trick: do one malloc for both the common and the entry */
-                        pEntryData=(UDataMemory *)uprv_malloc(2*sizeof(UDataMemory));
-                        if(pEntryData!=NULL) {
-                            pCommonData=pEntryData+1;
-                            uprv_memcpy(pCommonData, &dataMemory, sizeof(UDataMemory));
-                        }
-                    } else {
-                        pEntryData=(UDataMemory *)uprv_malloc(sizeof(UDataMemory));
-                    }
-                    if(pEntryData==NULL) {
-                        *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
-                        return NULL;
-                    }
-                    uprv_memset(pEntryData, 0, sizeof(UDataMemory));
-                    pEntryData->parent=pCommonData;
-                    pEntryData->pHeader=pHeader;
-                    pEntryData->flags=pCommonData->flags&DATA_MEMORY_TYPE_MASK|1UL<<DYNAMIC_DATA_MEMORY_SHIFT;
-                    return pEntryData;
-                } else {
-                    /* the data is not acceptable, look further */
-                    errorCode=U_INVALID_FORMAT_ERROR;
-                }
-            }
-
-            /* the data is not in the common data, close that and look further */
-            s390dll=FALSE;
-            if(pCommonData==&dataMemory) {
-              udata_close(&dataMemory);
-           /* commonICUData = { NULL }; */
-              (&commonICUData)->flags = 0;
-    /* clear out the 'mini cache' used in openCommonData */
-                /* This is not thread safe!!!!!!! */
-            }
-        }
-        s390dll=FALSE;
-        (&commonICUData)->flags = 0 ;
-    }
-#endif
 
     /* try to get common data */
-    uprv_memset(&dataMemory, 0, sizeof(UDataMemory));
     pathBuffer[0]=0;
-    pCommonData=openCommonData(&dataMemory, path, isICUData, pathBuffer, &errorCode);
+    pCommonData=openCommonData(path, isICUData, &errorCode);
 #ifdef UDATA_DEBUG
     fprintf(stderr, "commonData;%p\n", pCommonData);
     fflush(stderr);
@@ -1172,45 +1175,31 @@ doOpenChoice(const char *path, const char *type, const char *name,
         if(pHeader!=NULL) {
             /* data found in the common data, test it */
             if(pHeader->dataHeader.magic1==0xda && pHeader->dataHeader.magic2==0x27 &&
-               pHeader->info.isBigEndian==U_IS_BIG_ENDIAN &&
-               (isAcceptable==NULL || isAcceptable(context, type, name, &pHeader->info))
-            ) {
-                /* acceptable - allocate parent, too, if necessary */
-                if(pCommonData==&dataMemory) {
-                    /* trick: do one malloc for both the common and the entry */
-                    pEntryData=(UDataMemory *)uprv_malloc(2*sizeof(UDataMemory));
-                    if(pEntryData!=NULL) {
-                        pCommonData=pEntryData+1;
-                        uprv_memcpy(pCommonData, &dataMemory, sizeof(UDataMemory));
-                    }
-                } else {
-                    pEntryData=(UDataMemory *)uprv_malloc(sizeof(UDataMemory));
-                }
+                pHeader->info.isBigEndian==U_IS_BIG_ENDIAN &&
+                (isAcceptable==NULL || isAcceptable(context, type, name, &pHeader->info))
+                ) {
+                pEntryData=UDataMemory_createNewInstance();
                 if(pEntryData==NULL) {
                     *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
                     return NULL;
                 }
-                uprv_memset(pEntryData, 0, sizeof(UDataMemory));
-                pEntryData->parent=pCommonData;
-                pEntryData->pHeader=pHeader;
-                pEntryData->flags=(pCommonData->flags&DATA_MEMORY_TYPE_MASK)|1UL<<DYNAMIC_DATA_MEMORY_SHIFT;
+                UDataMemory_init(pEntryData);
+                pEntryData->parent  = pCommonData;
+                pEntryData->pHeader = pHeader;
+                pEntryData->flags   = (pCommonData->flags&DATA_MEMORY_TYPE_MASK)|DYNAMIC_DATA_MEMORY_FLAG;
 #ifdef UDATA_DEBUG
-        fprintf(stderr, " made data @%p\n", pEntryData);
+                fprintf(stderr, " made data @%p\n", pEntryData);
 #endif
                 return pEntryData;
             } else {
                 /* the data is not acceptable, look further */
-#ifdef UDATA_DEBUG
-            fprintf(stderr, "Not acceptable\n");
-#endif
+                /* If we eventually find something good, this errorcode will be */
+                /*    cleared out.                                              */
                 errorCode=U_INVALID_FORMAT_ERROR;
             }
         }
 
-        /* the data is not in the common data, close that and look further */
-        if(pCommonData==&dataMemory) {
-            udata_close(&dataMemory);
-        }
+        /* the data was not found in the common data,  look further */
     }
 
     /* try to get an individual data file */
@@ -1231,8 +1220,8 @@ doOpenChoice(const char *path, const char *type, const char *name,
         *suffix++='_';
         uprv_strcpy(suffix, tocEntryName);
 
-        if( uprv_mapFile(&dataMemory, pathBuffer, basename) ||
-            (basename!=pathBuffer && uprv_mapFile(&dataMemory, basename, basename))
+        if( uprv_mapFile(&dataMemory, pathBuffer) ||
+            (basename!=pathBuffer && uprv_mapFile(&dataMemory, basename))
         ) {
             pHeader=dataMemory.pHeader;
             if(pHeader->dataHeader.magic1==0xda && pHeader->dataHeader.magic2==0x27 &&
@@ -1246,7 +1235,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
                     *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
                     return NULL;
                 }
-                dataMemory.flags|=1UL<<DYNAMIC_DATA_MEMORY_SHIFT;
+                dataMemory.flags |= DYNAMIC_DATA_MEMORY_FLAG;
                 uprv_memcpy(pEntryData, &dataMemory, sizeof(UDataMemory));
                 return pEntryData;
             } else {
@@ -1259,8 +1248,8 @@ doOpenChoice(const char *path, const char *type, const char *name,
 
     /* try path+entryName next */
     uprv_strcpy(basename, tocEntryName);
-    if( uprv_mapFile(&dataMemory, pathBuffer, basename) ||
-        (basename!=pathBuffer && uprv_mapFile(&dataMemory, basename, basename))
+    if( uprv_mapFile(&dataMemory, pathBuffer) ||
+        (basename!=pathBuffer && uprv_mapFile(&dataMemory, basename))
     ) {
         pHeader=dataMemory.pHeader;
         if(pHeader->dataHeader.magic1==0xda && pHeader->dataHeader.magic2==0x27 &&
@@ -1274,7 +1263,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
                 *pErrorCode=U_MEMORY_ALLOCATION_ERROR;
                 return NULL;
             }
-            dataMemory.flags|=1UL<<DYNAMIC_DATA_MEMORY_SHIFT;
+            dataMemory.flags |= DYNAMIC_DATA_MEMORY_FLAG;
             uprv_memcpy(pEntryData, &dataMemory, sizeof(UDataMemory));
             return pEntryData;
         } else {
@@ -1299,7 +1288,7 @@ doOpenChoice(const char *path, const char *type, const char *name,
 
 static void
 unloadDataMemory(UDataMemory *pData) {
-    if(!(pData->flags&(1UL<<SET_DATA_POINTER_SHIFT))) {
+    if ((pData->flags & SET_DATA_POINTER_FLAG) == 0) {
         switch(pData->flags&DATA_MEMORY_TYPE_MASK) {
         case FLAT_DATA_MEMORY:
             if(IS_MAP(pData->map)) {
@@ -1361,13 +1350,12 @@ udata_close(UDataMemory *pData) {
   fprintf(stderr, "udata_close()\n");fflush(stderr);
 #endif
 
-    if(pData!=NULL && IS_DATA_MEMORY_LOADED(pData)) {
+    if(pData!=NULL &&
+        IS_DATA_MEMORY_LOADED(pData)) {
+        // TODO:  maybe reference count cached data, rather than just
+        //        permanently keeping it around?
         unloadDataMemory(pData);
-        if(pData->flags&(1UL<<DYNAMIC_DATA_MEMORY_SHIFT)) {
-            if(pData->parent==pData+1) {
-                /* this data entry was allocated together with its parent */
-                unloadDataMemory(pData+1);
-            }
+        if(pData->flags & DYNAMIC_DATA_MEMORY_FLAG ) {
             uprv_free(pData);
         } else {
             pData->flags=0;
diff --git a/icu4c/source/common/unicode/udata.h b/icu4c/source/common/unicode/udata.h
index 76f5c5b128f..ab97997bc08 100644
--- a/icu4c/source/common/unicode/udata.h
+++ b/icu4c/source/common/unicode/udata.h
@@ -262,6 +262,32 @@ udata_getInfo(UDataMemory *pData, UDataInfo *pInfo);
 U_CAPI void U_EXPORT2
 udata_setCommonData(const void *data, UErrorCode *err);
 
+
+/**
+ * This function bypasses the normal ICU data loading process for application-specific
+ * data and allows you to force the it to come out of a user-specified
+ * pointer.
+ * 
+ * The format of this data is that of the icu common data file, 'icudata.dat'
+ * Read in or memory map the whole file and then pass the address to the start of the
+ * data to this function.
+ *
+ * Warning:  setAppData will fail with a U_USING_DEFAULT_ERROR error if
+ *           data with the specifed path that has already been opened, or
+ *           if setAppData with the same path has already been called.
+ *           Any such calls to setAppData will have no effect.
+ *
+ *
+ * @draft
+ * @param path pointer to the path name by which the application will refer
+ *             to (open) this data.
+ * @param data pointer to the data
+ * @param err outgoing error status <code>U_USING_DEFAULT_ERROR, U_UNSUPPORTED_ERROR</code>
+ *
+ */
+U_CAPI void U_EXPORT2
+udata_setAppData(const char *path, const void *data, UErrorCode *err);
+
 U_CDECL_END
 
 #endif
diff --git a/icu4c/source/common/unicode/utypes.h b/icu4c/source/common/unicode/utypes.h
index 4ae41ec5517..22e4c46f394 100644
--- a/icu4c/source/common/unicode/utypes.h
+++ b/icu4c/source/common/unicode/utypes.h
@@ -117,17 +117,21 @@
 #   if U_IS_BIG_ENDIAN
    /* EBCDIC - should always be BE */
 #     define U_ICUDATA_TYPE_LETTER "e"
+#     define U_ICUDATA_TYPE_LITLETTER e
 #   else
 #     error "Don't know what to do with little endian EBCDIC!"
 #     define U_ICUDATA_TYPE_LETTER "x"
+#     define U_ICUDATA_TYPE_LITLETTER x
 #   endif
 #else
 #   if U_IS_BIG_ENDIAN
       /* Big-endian ASCII */
 #     define U_ICUDATA_TYPE_LETTER "b"
+#     define U_ICUDATA_TYPE_LITLETTER b
 #   else
       /* Little-endian ASCII */
 #     define U_ICUDATA_TYPE_LETTER "l"
+#     define U_ICUDATA_TYPE_LITLETTER l
 #   endif
 #endif
 
@@ -145,10 +149,18 @@
  *                              the literal text U_ICU_VERSION_MAJOR_NUM into the name.
  *                              The net result will be something of the form
  *                                  #define U_ICU_ENTRY_POINT icudt19_dat
+ *                              Note & TODO:  On Unixes, the name includes the endianness letter
+ *                                  e.g. icudt19l_dat.  It should be removed, which will
+ *                                  involve doing something in the area of the data build.
  */
-#define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM)
-#define U_DEF2_ICUDATA_ENTRY_POINT(major, minor) U_DEF_ICUDATA_ENTRY_POINT(major, minor)
-#define U_DEF_ICUDATA_ENTRY_POINT(major, minor) icudt##major##minor##_dat
+#ifdef WIN32
+#pragma warning( disable : 4003 )  /* Disable 'not enough actual parameters for macro' warning  */
+#define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM) 
+#else
+#define U_ICUDATA_ENTRY_POINT  U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM, U_ICUDATA_TYPE_LITLETTER)
+#endif
+#define U_DEF2_ICUDATA_ENTRY_POINT(major, minor, letter) U_DEF_ICUDATA_ENTRY_POINT(major, minor, letter)
+#define U_DEF_ICUDATA_ENTRY_POINT(major, minor, letter) icudt##major##minor##letter##_dat
 
 #if 0
 #define FOO(X) STRINGIZE(X)
diff --git a/icu4c/source/config/mh-aix b/icu4c/source/config/mh-aix
index 23e64235518..6978b2d31eb 100644
--- a/icu4c/source/config/mh-aix
+++ b/icu4c/source/config/mh-aix
@@ -3,7 +3,7 @@
 ## Copyright (c) 1999-2000, International Business Machines Corporation and
 ## others. All Rights Reserved.
 ##
-## $Id: mh-aix,v 1.20 2001/07/16 23:34:12 aheninger Exp $
+## $Id: mh-aix,v 1.21 2001/08/10 20:49:59 aheninger Exp $
 
 ## Commands to generate dependency files
 GEN_DEPS.c=	$(CC) -E -M $(DEFS) $(CPPFLAGS)
@@ -56,7 +56,8 @@ INSTALL-S = $(INSTALL_PROGRAM)
 INSTALL-L = $(INSTALL_DATA)
 
 ## Link commands to link to ICU libs
-LIBICUUC=       -brtl -L$(top_builddir)/common -l$(ICUPREFIX)uc
+LIBICUDT=       -L$(top_builddir)/data -L$(top_builddir)/stubdata -l$(ICUPREFIX)data
+LIBICUUC=       -brtl -L$(top_builddir)/common -l$(ICUPREFIX)uc $(LIBICUDT)
 LIBICUI18N= 	-brtl -L$(top_builddir)/i18n -l$(ICUPREFIX)i18n
 LIBCTESTFW= 	-brtl -L$(top_builddir)/tools/ctestfw -lctestfw
 LIBICUTOOLUTIL= -brtl -L$(top_builddir)/tools/toolutil -l$(ICUPREFIX)toolutil
diff --git a/icu4c/source/config/mh-hpux-acc b/icu4c/source/config/mh-hpux-acc
index 35bfcd4bbe1..3dc686b8ef4 100644
--- a/icu4c/source/config/mh-hpux-acc
+++ b/icu4c/source/config/mh-hpux-acc
@@ -3,7 +3,7 @@
 ## Copyright (c) 1999-2000, International Business Machines Corporation and
 ## others. All Rights Reserved.
 ##
-## $Id: mh-hpux-acc,v 1.22 2001/07/16 23:34:12 aheninger Exp $
+## $Id: mh-hpux-acc,v 1.23 2001/08/10 20:49:59 aheninger Exp $
 
 ## Commands to generate dependency files
 GEN_DEPS.c=	:
@@ -54,7 +54,8 @@ INSTALL-S = $(INSTALL_PROGRAM)
 INSTALL-L = $(INSTALL_DATA)
 
 ## Link commands to link to ICU libs
-LIBICUUC= 	-L$(top_builddir)/common -l$(ICUPREFIX)uc
+LIBICUDT=       -L$(top_builddir)/data -L$(top_builddir)/stubdata -l$(ICUPREFIX)data
+LIBICUUC= 	-L$(top_builddir)/common -l$(ICUPREFIX)uc $(LIBICUDT)
 LIBICUI18N= 	-L$(top_builddir)/i18n -l$(ICUPREFIX)i18n
 LIBCTESTFW= 	-L$(top_builddir)/tools/ctestfw -lctestfw
 LIBICUTOOLUTIL=-L$(top_builddir)/tools/toolutil -l$(ICUPREFIX)toolutil
diff --git a/icu4c/source/config/mh-linux b/icu4c/source/config/mh-linux
index acc8c179285..5698b2b06f5 100644
--- a/icu4c/source/config/mh-linux
+++ b/icu4c/source/config/mh-linux
@@ -3,7 +3,7 @@
 ## Copyright (c) 1999-2000, International Business Machines Corporation and
 ## others. All Rights Reserved.
 ##
-## $Id: mh-linux,v 1.23 2000/11/04 02:16:11 srl Exp $
+## $Id: mh-linux,v 1.24 2001/08/10 20:49:59 aheninger Exp $
 
 ## Commands to generate dependency files
 GEN_DEPS.c=	$(CC) -E -MM $(DEFS) $(CPPFLAGS)
@@ -60,10 +60,11 @@ INSTALL-S = $(INSTALL_PROGRAM)
 INSTALL-L = $(INSTALL_DATA)
 
 ## Link commands to link to ICU libs
-LIBICUUC= 	-L$(top_builddir)/common -l$(ICUPREFIX)uc
+LIBICUDT=       -L$(top_builddir)/data -L$(top_builddir)/stubdata -l$(ICUPREFIX)data
+LIBICUUC=       -L$(top_builddir)/common -l$(ICUPREFIX)uc $(LIBICUDT)
 LIBICUI18N= 	-L$(top_builddir)/i18n -l$(ICUPREFIX)i18n
 LIBCTESTFW= 	-L$(top_builddir)/tools/ctestfw -lctestfw
-LIBICUTOOLUTIL=-L$(top_builddir)/tools/toolutil -l$(ICUPREFIX)toolutil
+LIBICUTOOLUTIL= -L$(top_builddir)/tools/toolutil -l$(ICUPREFIX)toolutil
 LIBUSTDIO=      -L$(top_builddir)/extra/ustdio -lustdio
 
 ## Compilation rules
diff --git a/icu4c/source/config/mh-solaris b/icu4c/source/config/mh-solaris
index 3587319e7ac..c7938e1ca60 100644
--- a/icu4c/source/config/mh-solaris
+++ b/icu4c/source/config/mh-solaris
@@ -3,7 +3,7 @@
 ## Copyright (c) 1999-2000, International Business Machines Corporation and
 ## others. All Rights Reserved.
 ##
-## $Id: mh-solaris,v 1.21 2000/11/04 02:16:11 srl Exp $
+## $Id: mh-solaris,v 1.22 2001/08/10 20:49:59 aheninger Exp $
 
 ## Flags for position independent code
 SHAREDLIBCFLAGS = -KPIC
@@ -58,7 +58,8 @@ INSTALL-S = $(INSTALL_PROGRAM)
 INSTALL-L = $(INSTALL_DATA)
 
 ## Link commands to link to ICU libs
-LIBICUUC= 	-L$(top_builddir)/common -l$(ICUPREFIX)uc
+LIBICUDT=       -L$(top_builddir)/data -L$(top_builddir)/stubdata -licudata
+LIBICUUC= 	-L$(top_builddir)/common -l$(ICUPREFIX)uc $(LIBICUDT)
 LIBICUI18N= 	-L$(top_builddir)/i18n -l$(ICUPREFIX)i18n
 LIBCTESTFW= 	-L$(top_builddir)/tools/ctestfw -lctestfw
 LIBICUTOOLUTIL=-L$(top_builddir)/tools/toolutil -l$(ICUPREFIX)toolutil
diff --git a/icu4c/source/configure b/icu4c/source/configure
index 8dd36b0a3ba..d5325357fda 100755
--- a/icu4c/source/configure
+++ b/icu4c/source/configure
@@ -19,6 +19,8 @@ ac_help="$ac_help
   --enable-shared[=PKGS]  build shared libraries [default=yes]"
 ac_help="$ac_help
   --enable-static[=PKGS]  build static libraries [default=no]"
+ac_help="$ac_help
+  --enable-refdata        compile in a reference to the common data library [default=yes]"
 ac_help="$ac_help
   --enable-rpath          use rpath when linking [default is only if necessary]"
 ac_help="$ac_help
@@ -554,7 +556,7 @@ PACKAGE="icu"
 
 
 echo $ac_n "checking for ICU version numbers""... $ac_c" 1>&6
-echo "configure:558: checking for ICU version numbers" >&5
+echo "configure:560: checking for ICU version numbers" >&5
 
 
 geticuversion() {
@@ -588,7 +590,7 @@ CPPFLAGS="${CPPFLAGS} -I."
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:592: checking for $ac_word" >&5
+echo "configure:594: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -618,7 +620,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:622: checking for $ac_word" >&5
+echo "configure:624: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -669,7 +671,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:673: checking for $ac_word" >&5
+echo "configure:675: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -701,7 +703,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:705: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:707: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -712,12 +714,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 716 "configure"
+#line 718 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -743,12 +745,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:749: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:752: checking whether we are using GNU C" >&5
+echo "configure:754: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -757,7 +759,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -776,7 +778,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:780: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:782: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -812,7 +814,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:816: checking for $ac_word" >&5
+echo "configure:818: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -844,7 +846,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:848: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:850: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -855,12 +857,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 859 "configure"
+#line 861 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -886,12 +888,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:890: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:892: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:895: checking whether we are using GNU C++" >&5
+echo "configure:897: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -900,7 +902,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -919,7 +921,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:923: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:925: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -981,7 +983,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:985: checking for a BSD compatible install" >&5
+echo "configure:987: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1045,7 +1047,7 @@ fi
 # Extract the first word of "autoconf", so it can be a program name with args.
 set dummy autoconf; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1049: checking for $ac_word" >&5
+echo "configure:1051: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1075,7 +1077,7 @@ fi
 # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1079: checking for $ac_word" >&5
+echo "configure:1081: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1108,7 +1110,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1112: checking for $ac_word" >&5
+echo "configure:1114: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_U_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1148,7 +1150,7 @@ test -n "$U_MAKE" || U_MAKE="make"
 
 
     echo $ac_n "checking whether strict compiling is on""... $ac_c" 1>&6
-echo "configure:1152: checking whether strict compiling is on" >&5
+echo "configure:1154: checking whether strict compiling is on" >&5
     # Check whether --enable-strict or --disable-strict was given.
 if test "${enable_strict+set}" = set; then
   enableval="$enable_strict"
@@ -1186,7 +1188,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1190: checking host system type" >&5
+echo "configure:1192: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -1212,7 +1214,7 @@ case "${host}" in
 *-*-solaris*)
 	if test "$ac_cv_prog_gcc" = no; then
 		echo $ac_n "checking if we can use a 64-bit (sparcv9) compiler""... $ac_c" 1>&6
-echo "configure:1216: checking if we can use a 64-bit (sparcv9) compiler" >&5
+echo "configure:1218: checking if we can use a 64-bit (sparcv9) compiler" >&5
 		SOL64=`$CXX -xarch=v9 && $CC -xarch=v9 2>&1 |grep -v usage:`
 		SPARCV9=`isainfo -n | grep sparcv9`
 		if test -z "$SOL64" && test -n "$SPARCV9"; then
@@ -1231,7 +1233,7 @@ esac
 
 
 	echo $ac_n "checking which Makefile fragment to use""... $ac_c" 1>&6
-echo "configure:1235: checking which Makefile fragment to use" >&5
+echo "configure:1237: checking which Makefile fragment to use" >&5
 if eval "test \"`echo '$''{'icu_cv_host_frag'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1286,7 +1288,7 @@ hpuxcma=false
 case "${host}" in
 	*-*-hpux10*)    hpuxcma=true
 			echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6
-echo "configure:1290: checking for floor in -lm" >&5
+echo "configure:1292: checking for floor in -lm" >&5
 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1294,7 +1296,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1298 "configure"
+#line 1300 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1305,7 +1307,7 @@ int main() {
 floor()
 ; return 0; }
 EOF
-if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1326,7 +1328,7 @@ else
 fi
  ;;
 	*-*-hpux*) 	echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6
-echo "configure:1330: checking for floor in -lm" >&5
+echo "configure:1332: checking for floor in -lm" >&5
 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1334,7 +1336,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1338 "configure"
+#line 1340 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1345,7 +1347,7 @@ int main() {
 floor()
 ; return 0; }
 EOF
-if { (eval echo configure:1349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1367,7 +1369,7 @@ fi
  ;;
 	
 	*) 		echo $ac_n "checking for floor in -lm""... $ac_c" 1>&6
-echo "configure:1371: checking for floor in -lm" >&5
+echo "configure:1373: checking for floor in -lm" >&5
 ac_lib_var=`echo m'_'floor | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1375,7 +1377,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1379 "configure"
+#line 1381 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1386,7 +1388,7 @@ int main() {
 floor()
 ; return 0; }
 EOF
-if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1449,7 +1451,7 @@ if test $hpuxcma = true; then
 fi
 
 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
-echo "configure:1453: checking whether to build shared libraries" >&5
+echo "configure:1455: checking whether to build shared libraries" >&5
 enabled=no
 # Check whether --enable-shared or --disable-shared was given.
 if test "${enable_shared+set}" = set; then
@@ -1468,7 +1470,7 @@ echo "$ac_t""$enabled" 1>&6
 
 
 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
-echo "configure:1472: checking whether to build static libraries" >&5
+echo "configure:1474: checking whether to build static libraries" >&5
 enabled=no
 # Check whether --enable-static or --disable-static was given.
 if test "${enable_static+set}" = set; then
@@ -1486,7 +1488,7 @@ echo "$ac_t""$enabled" 1>&6
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1490: checking for $ac_word" >&5
+echo "configure:1492: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1514,6 +1516,27 @@ else
 fi
 
 
+echo $ac_n "checking whether to statically reference common data library""... $ac_c" 1>&6
+echo "configure:1521: checking whether to statically reference common data library" >&5
+# Check whether --enable-refdata or --disable-refdata was given.
+if test "${enable_refdata+set}" = set; then
+  enableval="$enable_refdata"
+   case "#{enableval}" in 
+      yes|"") enabled=yes; ENABLE_REFDATA=YES ;;
+	  no) enabled=no ;;
+	  *) enabled=yes; ENBABLE_REFDATA=YES ;;
+	esac
+else
+  enabled=yes; ENABLE_REFDATA=YES
+
+fi
+
+echo "$ac_t""$enabled" 1>&6
+
+
+
+
+
 # Check whether --enable-rpath or --disable-rpath was given.
 if test "${enable_rpath+set}" = set; then
   enableval="$enable_rpath"
@@ -1558,7 +1581,7 @@ ICU_USE_THREADS=0
 if test $hpuxcma = true; then
   if test $threads = true; then
   echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
-echo "configure:1562: checking for pthread_create in -lcma" >&5
+echo "configure:1585: checking for pthread_create in -lcma" >&5
 ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1566,7 +1589,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lcma  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1570 "configure"
+#line 1593 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1577,7 +1600,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:1581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1614,7 +1637,7 @@ if test $threads = true; then
       
  
 echo $ac_n "checking for library containing pthread_mutex_destroy""... $ac_c" 1>&6
-echo "configure:1618: checking for library containing pthread_mutex_destroy" >&5
+echo "configure:1641: checking for library containing pthread_mutex_destroy" >&5
 if eval "test \"`echo '$''{'ac_cv_search_pthread_mutex_destroy'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1623,29 +1646,6 @@ ac_cv_search_pthread_mutex_destroy="no"
 for i in pthread pthreads c_r cma; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1627 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char pthread_mutex_destroy();
-
-int main() {
-pthread_mutex_destroy()
-; return 0; }
-EOF
-if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ac_cv_search_pthread_mutex_destroy="-l$i"
-break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-if test "$ac_cv_search_pthread_mutex_destroy" = "no"; then
-cat > conftest.$ac_ext <<EOF
 #line 1650 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1658,6 +1658,29 @@ pthread_mutex_destroy()
 ; return 0; }
 EOF
 if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_search_pthread_mutex_destroy="-l$i"
+break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+if test "$ac_cv_search_pthread_mutex_destroy" = "no"; then
+cat > conftest.$ac_ext <<EOF
+#line 1673 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char pthread_mutex_destroy();
+
+int main() {
+pthread_mutex_destroy()
+; return 0; }
+EOF
+if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_pthread_mutex_destroy="none required"
 else
@@ -1681,7 +1704,7 @@ fi
   ICU_USE_THREADS=1
  else
       echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
-echo "configure:1685: checking for pthread_mutex_init in -lpthread" >&5
+echo "configure:1708: checking for pthread_mutex_init in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1689,7 +1712,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1693 "configure"
+#line 1716 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1700,7 +1723,7 @@ int main() {
 pthread_mutex_init()
 ; return 0; }
 EOF
-if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1733,12 +1756,12 @@ fi
  fi
 
  echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
-echo "configure:1737: checking for pthread_mutex_lock" >&5
+echo "configure:1760: checking for pthread_mutex_lock" >&5
 if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1742 "configure"
+#line 1765 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pthread_mutex_lock(); below.  */
@@ -1761,7 +1784,7 @@ pthread_mutex_lock();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_pthread_mutex_lock=yes"
 else
@@ -1797,14 +1820,14 @@ HAVE_DLOPEN=0
 #add more libs here..
 
 echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
-echo "configure:1801: checking for library containing dlopen" >&5
+echo "configure:1824: checking for library containing dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_search_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_dlopen="no"
 cat > conftest.$ac_ext <<EOF
-#line 1808 "configure"
+#line 1831 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1815,7 +1838,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_dlopen="none required"
 else
@@ -1826,7 +1849,7 @@ rm -f conftest*
 test "$ac_cv_search_dlopen" = "no" && for i in c dl; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1830 "configure"
+#line 1853 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1837,7 +1860,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:1841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_dlopen="-l$i"
 break
@@ -1864,7 +1887,7 @@ fi
 
 if test $HAVE_DLOPEN = 0; then
 	echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:1868: checking for shl_load in -ldld" >&5
+echo "configure:1891: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1872,7 +1895,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1876 "configure"
+#line 1899 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1883,7 +1906,7 @@ int main() {
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1919,12 +1942,12 @@ fi
 
 if test $HAVE_DLOPEN = 0; then
    echo $ac_n "checking for dllload""... $ac_c" 1>&6
-echo "configure:1923: checking for dllload" >&5
+echo "configure:1946: checking for dllload" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dllload'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1928 "configure"
+#line 1951 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dllload(); below.  */
@@ -1947,7 +1970,7 @@ dllload();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dllload=yes"
 else
@@ -1974,7 +1997,7 @@ fi
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1978: checking how to run the C preprocessor" >&5
+echo "configure:2001: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1989,13 +2012,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1993 "configure"
+#line 2016 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2006,13 +2029,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2010 "configure"
+#line 2033 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2023,13 +2046,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2027 "configure"
+#line 2050 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2057,17 +2080,17 @@ for ac_hdr in unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2061: checking for $ac_hdr" >&5
+echo "configure:2084: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2066 "configure"
+#line 2089 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2096,12 +2119,12 @@ done
 for ac_func in getpagesize
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2100: checking for $ac_func" >&5
+echo "configure:2123: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2105 "configure"
+#line 2128 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2124,7 +2147,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2149,7 +2172,7 @@ fi
 done
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2153: checking for working mmap" >&5
+echo "configure:2176: checking for working mmap" >&5
 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2157,7 +2180,7 @@ else
   ac_cv_func_mmap_fixed_mapped=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 2161 "configure"
+#line 2184 "configure"
 #include "confdefs.h"
 
 /* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2297,7 +2320,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2328,17 +2351,17 @@ for ac_hdr in inttypes.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2332: checking for $ac_hdr" >&5
+echo "configure:2355: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2337 "configure"
+#line 2360 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2398,7 +2421,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
     U_IOSTREAM_SOURCE=0
     echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:2402: checking how to run the C++ preprocessor" >&5
+echo "configure:2425: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2411,12 +2434,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 2415 "configure"
+#line 2438 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -2442,17 +2465,17 @@ echo "$ac_t""$CXXCPP" 1>&6
 
 ac_safe=`echo "iostream" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for iostream""... $ac_c" 1>&6
-echo "configure:2446: checking for iostream" >&5
+echo "configure:2469: checking for iostream" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2451 "configure"
+#line 2474 "configure"
 #include "confdefs.h"
 #include <iostream>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2479,17 +2502,17 @@ fi
     else
         ac_safe=`echo "iostream.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for iostream.h""... $ac_c" 1>&6
-echo "configure:2483: checking for iostream.h" >&5
+echo "configure:2506: checking for iostream.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2488 "configure"
+#line 2511 "configure"
 #include "confdefs.h"
 #include <iostream.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2512,19 +2535,19 @@ fi
 
         if test $ac_cv_header_iostream_h = yes; then
             echo $ac_n "checking whether ostream is really defined""... $ac_c" 1>&6
-echo "configure:2516: checking whether ostream is really defined" >&5
+echo "configure:2539: checking whether ostream is really defined" >&5
             if eval "test \"`echo '$''{'ac_cv_iostream_ok'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2521 "configure"
+#line 2544 "configure"
 #include "confdefs.h"
 #include <iostream.h>
 int main() {
 ostream &testout = cout; testout << "test" << endl;
 ; return 0; }
 EOF
-if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_iostream_ok=yes
 else
@@ -2563,14 +2586,14 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2567: checking whether byte ordering is bigendian" >&5
+echo "configure:2590: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 2574 "configure"
+#line 2597 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2581,11 +2604,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 2589 "configure"
+#line 2612 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2596,7 +2619,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -2616,7 +2639,7 @@ if test "$cross_compiling" = yes; then
     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
 else
   cat > conftest.$ac_ext <<EOF
-#line 2620 "configure"
+#line 2643 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -2629,7 +2652,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:2633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -2663,17 +2686,17 @@ fi
 
 ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
-echo "configure:2667: checking for wchar.h" >&5
+echo "configure:2690: checking for wchar.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2672 "configure"
+#line 2695 "configure"
 #include "confdefs.h"
 #include <wchar.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2706,14 +2729,14 @@ EOF
     U_HAVE_WCHAR_H=1
         
 echo $ac_n "checking for library containing wcscpy""... $ac_c" 1>&6
-echo "configure:2710: checking for library containing wcscpy" >&5
+echo "configure:2733: checking for library containing wcscpy" >&5
 if eval "test \"`echo '$''{'ac_cv_search_wcscpy'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_func_search_save_LIBS="$LIBS"
 ac_cv_search_wcscpy="no"
 cat > conftest.$ac_ext <<EOF
-#line 2717 "configure"
+#line 2740 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2724,7 +2747,7 @@ int main() {
 wcscpy()
 ; return 0; }
 EOF
-if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_wcscpy="none required"
 else
@@ -2735,7 +2758,7 @@ rm -f conftest*
 test "$ac_cv_search_wcscpy" = "no" && for i in wcs; do
 LIBS="-l$i  $ac_func_search_save_LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2739 "configure"
+#line 2762 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2746,7 +2769,7 @@ int main() {
 wcscpy()
 ; return 0; }
 EOF
-if { (eval echo configure:2750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_search_wcscpy="-l$i"
 break
@@ -2778,12 +2801,12 @@ fi
 U_HAVE_NL_LANGINFO_CODESET=0
 U_NL_LANGINFO_CODESET=-1
 echo $ac_n "checking for nl_langinfo""... $ac_c" 1>&6
-echo "configure:2782: checking for nl_langinfo" >&5
+echo "configure:2805: checking for nl_langinfo" >&5
 if eval "test \"`echo '$''{'ac_cv_func_nl_langinfo'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2787 "configure"
+#line 2810 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char nl_langinfo(); below.  */
@@ -2806,7 +2829,7 @@ nl_langinfo();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_nl_langinfo=yes"
 else
@@ -2829,21 +2852,21 @@ fi
 
 if test $U_HAVE_NL_LANGINFO -eq 1; then
   echo $ac_n "checking for nl_langinfo's argument to obtain the codeset""... $ac_c" 1>&6
-echo "configure:2833: checking for nl_langinfo's argument to obtain the codeset" >&5
+echo "configure:2856: checking for nl_langinfo's argument to obtain the codeset" >&5
 if eval "test \"`echo '$''{'ac_cv_nl_langinfo_codeset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_nl_langinfo_codeset="unknown"
   for a in CODESET _NL_CTYPE_CODESET_NAME; do
   cat > conftest.$ac_ext <<EOF
-#line 2840 "configure"
+#line 2863 "configure"
 #include "confdefs.h"
 #include <langinfo.h>
 int main() {
 nl_langinfo($a);
 ; return 0; }
 EOF
-if { (eval echo configure:2847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_nl_langinfo_codeset="$a"; break
 else
@@ -2864,12 +2887,12 @@ fi
 
 
 echo $ac_n "checking for tzset""... $ac_c" 1>&6
-echo "configure:2868: checking for tzset" >&5
+echo "configure:2891: checking for tzset" >&5
 if eval "test \"`echo '$''{'ac_cv_func_tzset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2873 "configure"
+#line 2896 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char tzset(); below.  */
@@ -2892,7 +2915,7 @@ tzset();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_tzset=yes"
 else
@@ -2916,12 +2939,12 @@ then
     U_TZSET=tzset
 else
     echo $ac_n "checking for _tzset""... $ac_c" 1>&6
-echo "configure:2920: checking for _tzset" >&5
+echo "configure:2943: checking for _tzset" >&5
 if eval "test \"`echo '$''{'ac_cv_func__tzset'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2925 "configure"
+#line 2948 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _tzset(); below.  */
@@ -2944,7 +2967,7 @@ _tzset();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__tzset=yes"
 else
@@ -2970,12 +2993,12 @@ fi
 fi
 
 echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2974: checking for tzname" >&5
+echo "configure:2997: checking for tzname" >&5
 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2979 "configure"
+#line 3002 "configure"
 #include "confdefs.h"
 #ifndef __USE_POSIX
 #define __USE_POSIX
@@ -2988,7 +3011,7 @@ int main() {
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:2992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -3005,12 +3028,12 @@ if test $ac_cv_var_tzname = yes; then
   U_TZNAME=tzname
 else
   echo $ac_n "checking for _tzname""... $ac_c" 1>&6
-echo "configure:3009: checking for _tzname" >&5
+echo "configure:3032: checking for _tzname" >&5
 if eval "test \"`echo '$''{'ac_cv_var__tzname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3014 "configure"
+#line 3037 "configure"
 #include "confdefs.h"
   #include <time.h>
   extern char *_tzname[];
@@ -3019,7 +3042,7 @@ int main() {
   atoi(*_tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:3023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var__tzname=yes
 else
@@ -3038,12 +3061,12 @@ echo "$ac_t""$ac_cv_var__tzname" 1>&6
 fi
 
 echo $ac_n "checking for timezone""... $ac_c" 1>&6
-echo "configure:3042: checking for timezone" >&5
+echo "configure:3065: checking for timezone" >&5
 if eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3047 "configure"
+#line 3070 "configure"
 #include "confdefs.h"
 #ifndef __USE_POSIX
 #define __USE_POSIX
@@ -3057,7 +3080,7 @@ int main() {
 timezone = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var_timezone=yes
 else
@@ -3074,12 +3097,12 @@ if test $ac_cv_var_timezone = yes; then
   U_TIMEZONE=timezone
 else
   echo $ac_n "checking for __timezone""... $ac_c" 1>&6
-echo "configure:3078: checking for __timezone" >&5
+echo "configure:3101: checking for __timezone" >&5
 if eval "test \"`echo '$''{'ac_cv_var___timezone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3083 "configure"
+#line 3106 "configure"
 #include "confdefs.h"
   #include <time.h>
   
@@ -3087,7 +3110,7 @@ int main() {
   __timezone = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:3091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var___timezone=yes
 else
@@ -3104,12 +3127,12 @@ echo "$ac_t""$ac_cv_var___timezone" 1>&6
     U_TIMEZONE=__timezone
   else
     echo $ac_n "checking for _timezone""... $ac_c" 1>&6
-echo "configure:3108: checking for _timezone" >&5
+echo "configure:3131: checking for _timezone" >&5
 if eval "test \"`echo '$''{'ac_cv_var__timezone'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3113 "configure"
+#line 3136 "configure"
 #include "confdefs.h"
     #include <time.h>
     
@@ -3117,7 +3140,7 @@ int main() {
     _timezone = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_var__timezone=yes
 else
@@ -3139,7 +3162,7 @@ fi
 
 ac_default_sizeof_wchar_t=4
 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
-echo "configure:3143: checking size of wchar_t" >&5
+echo "configure:3166: checking size of wchar_t" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3147,7 +3170,7 @@ else
   ac_cv_sizeof_wchar_t=$ac_default_sizeof_wchar_t
 else
   cat > conftest.$ac_ext <<EOF
-#line 3151 "configure"
+#line 3174 "configure"
 #include "confdefs.h"
 #if STDC_HEADERS
 #include <stddef.h>
@@ -3164,7 +3187,7 @@ main()
   exit(0);
 }
 EOF
-if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_wchar_t=`cat conftestval`
 else
@@ -3187,12 +3210,12 @@ U_SIZEOF_WCHAR_T=$ac_cv_sizeof_wchar_t
 
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3191: checking for ANSI C header files" >&5
+echo "configure:3214: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3196 "configure"
+#line 3219 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3200,7 +3223,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3217,7 +3240,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3221 "configure"
+#line 3244 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -3235,7 +3258,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 3239 "configure"
+#line 3262 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -3256,7 +3279,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 3260 "configure"
+#line 3283 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3267,7 +3290,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3291,12 +3314,12 @@ EOF
 fi
 
 echo $ac_n "checking for int8_t""... $ac_c" 1>&6
-echo "configure:3295: checking for int8_t" >&5
+echo "configure:3318: checking for int8_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_int8_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3300 "configure"
+#line 3323 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3324,12 +3347,12 @@ EOF
 fi
 
 echo $ac_n "checking for uint8_t""... $ac_c" 1>&6
-echo "configure:3328: checking for uint8_t" >&5
+echo "configure:3351: checking for uint8_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3333 "configure"
+#line 3356 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3357,12 +3380,12 @@ EOF
 fi
 
 echo $ac_n "checking for int16_t""... $ac_c" 1>&6
-echo "configure:3361: checking for int16_t" >&5
+echo "configure:3384: checking for int16_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3366 "configure"
+#line 3389 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3390,12 +3413,12 @@ EOF
 fi
 
 echo $ac_n "checking for uint16_t""... $ac_c" 1>&6
-echo "configure:3394: checking for uint16_t" >&5
+echo "configure:3417: checking for uint16_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uint16_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3399 "configure"
+#line 3422 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3423,12 +3446,12 @@ EOF
 fi
 
 echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:3427: checking for int32_t" >&5
+echo "configure:3450: checking for int32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3432 "configure"
+#line 3455 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3456,12 +3479,12 @@ EOF
 fi
 
 echo $ac_n "checking for uint32_t""... $ac_c" 1>&6
-echo "configure:3460: checking for uint32_t" >&5
+echo "configure:3483: checking for uint32_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3465 "configure"
+#line 3488 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3489,12 +3512,12 @@ EOF
 fi
 
 echo $ac_n "checking for bool_t""... $ac_c" 1>&6
-echo "configure:3493: checking for bool_t" >&5
+echo "configure:3516: checking for bool_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_bool_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3498 "configure"
+#line 3521 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3922,6 +3945,7 @@ trap 'rm -fr `echo "README icudefs.mk \
 		common/Makefile config/Makefile.inc i18n/Makefile \
 		layout/Makefile \
 		extra/Makefile extra/ustdio/Makefile \
+		stubdata/Makefile \
 		tools/Makefile tools/ctestfw/Makefile tools/makeconv/Makefile \
 		tools/genrb/Makefile  \
 		tools/genuca/Makefile  \
@@ -3995,6 +4019,7 @@ s%@HPUX_CMA_FALSE@%$HPUX_CMA_FALSE%g
 s%@ENABLE_SHARED@%$ENABLE_SHARED%g
 s%@ENABLE_STATIC@%$ENABLE_STATIC%g
 s%@RANLIB@%$RANLIB%g
+s%@ENABLE_REFDATA@%$ENABLE_REFDATA%g
 s%@ENABLE_RPATH@%$ENABLE_RPATH%g
 s%@THREADS_TRUE@%$THREADS_TRUE%g
 s%@THREADS_FALSE@%$THREADS_FALSE%g
@@ -4086,6 +4111,7 @@ CONFIG_FILES=\${CONFIG_FILES-"README icudefs.mk \
 		common/Makefile config/Makefile.inc i18n/Makefile \
 		layout/Makefile \
 		extra/Makefile extra/ustdio/Makefile \
+		stubdata/Makefile \
 		tools/Makefile tools/ctestfw/Makefile tools/makeconv/Makefile \
 		tools/genrb/Makefile  \
 		tools/genuca/Makefile  \
diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in
index fb44c5083b9..7e112281858 100644
--- a/icu4c/source/configure.in
+++ b/icu4c/source/configure.in
@@ -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.114 2001/07/23 19:52:19 grhoten Exp $
+dnl $Id: configure.in,v 1.115 2001/08/10 20:49:58 aheninger Exp $
 
 dnl Process this file with autoconf to produce a configure script
 AC_INIT(common/unicode/utypes.h)
@@ -170,6 +170,23 @@ AC_SUBST(ENABLE_STATIC)
 
 AC_PROG_RANLIB
 
+dnl Check whether to make static reference to the data dll
+AC_MSG_CHECKING([whether to statically reference common data library])
+AC_ARG_ENABLE(refdata,
+   [  --enable-refdata        compile in a reference to the common data library [default=yes]],
+   [ case "#{enableval}" in 
+      yes|"") enabled=yes; ENABLE_REFDATA=YES ;;
+	  no) enabled=no ;;
+	  *) enabled=yes; ENBABLE_REFDATA=YES ;;
+	esac],
+	[enabled=yes; ENABLE_REFDATA=YES]
+)
+AC_MSG_RESULT($enabled)
+AC_SUBST(ENABLE_REFDATA)
+
+
+
+
 dnl Check whether to use the evil rpath or not
 AC_ARG_ENABLE(rpath,
     [  --enable-rpath          use rpath when linking [default is only if necessary]],
@@ -746,6 +763,7 @@ AC_OUTPUT([README icudefs.mk \
 		common/Makefile config/Makefile.inc i18n/Makefile \
 		layout/Makefile \
 		extra/Makefile extra/ustdio/Makefile \
+		stubdata/Makefile \
 		tools/Makefile tools/ctestfw/Makefile tools/makeconv/Makefile \
 		tools/genrb/Makefile  \
 		tools/genuca/Makefile  \
diff --git a/icu4c/source/data/Makefile.in b/icu4c/source/data/Makefile.in
index cdce4e5857a..8d74d335af3 100644
--- a/icu4c/source/data/Makefile.in
+++ b/icu4c/source/data/Makefile.in
@@ -38,7 +38,7 @@ LIB_ICUDATA_NAME=lib$(ICUDATA_NAME)
 SPECIALTESTDATA=test1.cnv test3.cnv test4.cnv
 TESTDATAOBJDIR=../test/testdata
 top_builddir_from_tmp = $(patsubst ..%,../..%,$(top_builddir))
-INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir_from_tmp)/common:$(top_builddir_from_tmp)/tools/toolutil:$$$(LDLIBRARYPATH_ENVVAR)
+INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir_from_tmp)/common:$(top_builddir_from_tmp)/tools/toolutil:$(top_builddir_from_tmp)/stubdata:$$$(LDLIBRARYPATH_ENVVAR)
 CURDIR=$(shell pwd)
 PKGDATA = $(top_builddir_from_tmp)/tools/pkgdata/pkgdata -O $(top_builddir_from_tmp)/tools/pkgdata/icupkg.inc -d $(CURDIR) -m $(PKGDATA_MODE) 
 
@@ -104,7 +104,10 @@ Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 		&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
 packagedata: build/icudata.lst $(top_builddir)/tools/pkgdata/icupkg.inc
-	( cd build ; $(INVOKE) $(PKGDATA) -e $(ICUDATA_NAME) -s . -T . -p $(ICUDATA_NAME) icudata.lst )
+	( cd build ; \
+	$(INVOKE) $(PKGDATA) -e $(ICUDATA_NAME) -s . -T . -p $(ICUDATA_NAME) icudata.lst ; \
+	)
+	$(RM) libicudata.$(SO) && ln -s $(LIB_ICUDATA_NAME).$(SO) libicudata.$(SO) ; \
 
 packagetest: $(TESTDATAOBJDIR)/testdata.lst $(top_builddir)/tools/pkgdata/icupkg.inc
 	( cd $(TESTDATAOBJDIR) ; $(INVOKE) $(PKGDATA) -T . -s . -p testdata testdata.lst )
diff --git a/icu4c/source/data/build/Makefile.in b/icu4c/source/data/build/Makefile.in
index f167d79926b..b53d2d8cb42 100644
--- a/icu4c/source/data/build/Makefile.in
+++ b/icu4c/source/data/build/Makefile.in
@@ -27,7 +27,7 @@ SRCLISTDEPS=Makefile $(srcdir)/Makefile.in $(SRCDATADIR)/resfiles.mk $(SRCDATADI
 OBJDATADIR=.
 
 # relative lib links from pkgdata are the same as for tmp
-INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/toolutil:$(top_builddir)/extra/ustdio:$$$(LDLIBRARYPATH_ENVVAR)
+INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/toolutil:$(top_builddir)/extra/ustdio:$(top_builddir)/stubdata/:$$$(LDLIBRARYPATH_ENVVAR)
 TOOLDIR=$(top_builddir)/tools
 
 ## List of phony targets
diff --git a/icu4c/source/samples/cal/Makefile.in b/icu4c/source/samples/cal/Makefile.in
index 4d6caab12e8..f96b3f8f9e6 100644
--- a/icu4c/source/samples/cal/Makefile.in
+++ b/icu4c/source/samples/cal/Makefile.in
@@ -39,7 +39,7 @@ ifeq ($(ENABLE_RPATH),YES)
 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
 endif
 LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
-INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$$$(LDLIBRARYPATH_ENVVAR)
+INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_bilddir)/source/data:$$$(LDLIBRARYPATH_ENVVAR)
 LIBS = $(LIBICUI18N) $(LIBICUUC) @LIBS@ @LIB_M@
 
 OBJECTS = uprint.o cal.o
diff --git a/icu4c/source/samples/date/Makefile.in b/icu4c/source/samples/date/Makefile.in
index a0d084ca02d..2acb5709666 100644
--- a/icu4c/source/samples/date/Makefile.in
+++ b/icu4c/source/samples/date/Makefile.in
@@ -39,7 +39,7 @@ ifeq ($(ENABLE_RPATH),YES)
 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
 endif
 LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
-INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$$$(LDLIBRARYPATH_ENVVAR)
+INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_bilddir)/source/data:$$$(LDLIBRARYPATH_ENVVAR)
 LIBS = $(LIBICUI18N) $(LIBICUUC) @LIBS@ @LIB_M@
 
 OBJECTS = uprint.o date.o
diff --git a/icu4c/source/stubdata/stubdata.c b/icu4c/source/stubdata/stubdata.c
index ed9f4334959..dd383d1ad62 100644
--- a/icu4c/source/stubdata/stubdata.c
+++ b/icu4c/source/stubdata/stubdata.c
@@ -28,15 +28,17 @@ typedef struct {
     UDataInfo info;
     char padding[8];
     uint32_t count, reserved;
-//    const struct {
-//      const char *const name; 
-//      const void *const data;
-//    } toc[1];
-   int   fakeNameAndData[4];       // TODO:  Change this header type from
-                                   //        pointerTOC to OffsetTOC.
-} ICU_Data_Heaser;;
+	/*
+    const struct {
+    const char *const name; 
+    const void *const data;
+    } toc[1];
+	*/
+   int   fakeNameAndData[4];       /* TODO:  Change this header type from */
+                                   /*        pointerTOC to OffsetTOC.     */
+} ICU_Data_Header;
 
-U_EXPORT const ICU_Data_Heaser U_EXPORT2 U_ICUDATA_ENTRY_POINT = {
+U_EXPORT const ICU_Data_Header U_EXPORT2 U_ICUDATA_ENTRY_POINT = {
     32,          /* headerSize */
     0xda,        /* magic1,  (see struct MappedData in udata.c)  */
     0x27,        /* magic2     */
diff --git a/icu4c/source/test/cintltst/Makefile.in b/icu4c/source/test/cintltst/Makefile.in
index 061ef0eab7a..45733cfdb38 100644
--- a/icu4c/source/test/cintltst/Makefile.in
+++ b/icu4c/source/test/cintltst/Makefile.in
@@ -46,7 +46,7 @@ ifeq ($(ENABLE_RPATH),YES)
 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
 endif
 LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
-INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/ctestfw:$(top_builddir)/tools/toolutil:$$$(LDLIBRARYPATH_ENVVAR)
+INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/ctestfw:$(top_builddir)/tools/toolutil:$(top_builddir)/data:$$$(LDLIBRARYPATH_ENVVAR)
 LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) @LIBS@ @LIB_M@
 
 OBJECTS = callcoll.o calltest.o capitst.o cbiapts.o cbkittst.o		\
@@ -58,7 +58,7 @@ cnmdptst.o cnormtst.o cnumtst.o cregrtst.o crestst.o creststn.o cturtst.o		\
 cucdtst.o cutiltst.o encoll.o nucnvtst.o susctest.o nccbtst.o \
 cbiditst.o cbididat.o eurocreg.o udatatst.o utf16tst.o utransts.o \
 ncnvfbts.o ncnvtst.o putiltst.o cstrtest.o mstrmtst.o utf8tst.o ucmptst.o \
-ucmpetst.o stdnmtst.o
+stdnmtst.o ucmpetst.o
 
 DEPS = $(OBJECTS:.o=.d)
 
@@ -93,7 +93,7 @@ distclean-local: clean-local
 -include Makefile.local
 
 check-local: all-local
-	ICU_DATA=$(top_builddir)/data/ TZ=PST8PDT $(INVOKE) ./$(TARGET) $(CINTLTEST_OPTS)
+	TZ=PST8PDT $(INVOKE) ./$(TARGET) $(CINTLTEST_OPTS)
 
 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 	cd $(top_builddir) \
diff --git a/icu4c/source/test/cintltst/cintltst.c b/icu4c/source/test/cintltst/cintltst.c
index d78ab177d75..953f27930b5 100644
--- a/icu4c/source/test/cintltst/cintltst.c
+++ b/icu4c/source/test/cintltst/cintltst.c
@@ -223,18 +223,21 @@ void ctest_setICU_DATA() {
         return;
     }
 
+
     /* U_SRCDATADIR is set by the makefiles on UNIXes when building cintltst and intltst
-     *              to point to the right place, "wherever/icu/source/data"
+     *              to point to "wherever/icu/data"
+     *              We can make a path from there to "wherever/icu/source/data"
      *   The value is complete with quotes, so it can be used as-is as a string constant.
      */
 #if defined (U_SRCDATADIR)
     {
-        static char env_string[] = "ICU_DATA=" U_SRCDATADIR;
+        static char env_string[] = "ICU_DATA=" U_SRCDATADIR "/../source/data";
         putenv(env_string);
         return;
     }
 #endif
 
+
     /* On Windows, the file name obtained from __FILE__ includes a full path.
      *             This file is "wherever\icu\source\test\cintltst\cintltst.c"
      *             Change to    "wherever\icu\source\data"
diff --git a/icu4c/source/test/intltest/Makefile.in b/icu4c/source/test/intltest/Makefile.in
index 50184b79f8b..30b3fc67f27 100644
--- a/icu4c/source/test/intltest/Makefile.in
+++ b/icu4c/source/test/intltest/Makefile.in
@@ -32,7 +32,7 @@ ifeq ($(ENABLE_RPATH),YES)
 RPATHLDFLAGS = $(LD_RPATH)$(LD_RPATH_PRE)$(libdir)
 endif
 LDFLAGS = @LDFLAGS@ $(RPATHLDFLAGS)
-INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/toolutil:$$$(LDLIBRARYPATH_ENVVAR)
+INVOKE = $(LDLIBRARYPATH_ENVVAR)=$(top_builddir)/common:$(top_builddir)/i18n:$(top_builddir)/tools/toolutil:$(top_builddir)/data:$$$(LDLIBRARYPATH_ENVVAR)
 LIBS = $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) @LIBS@ @LIB_M@
 
 OBJECTS = allcoll.o apicoll.o callimts.o calregts.o caltest.o		\
@@ -82,7 +82,7 @@ distclean-local: clean-local
 -include Makefile.local
 
 check-local: all-local
-	 ICU_DATA=$(top_builddir)/data/ TZ=PST8PDT $(INVOKE) ./$(TARGET)  $(INTLTESTOPTS)
+	 TZ=PST8PDT $(INVOKE) ./$(TARGET)  $(INTLTESTOPTS) || true
 
 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
 	cd $(top_builddir) \
diff --git a/icu4c/source/test/intltest/intltest.cpp b/icu4c/source/test/intltest/intltest.cpp
index 964f87aae5d..7548ff790ce 100644
--- a/icu4c/source/test/intltest/intltest.cpp
+++ b/icu4c/source/test/intltest/intltest.cpp
@@ -16,7 +16,6 @@
 #include <string.h>
 #include <assert.h>
 #include <stdarg.h>
-#include <stdlib.h>
 
 #include "unicode/unistr.h"
 #include "unicode/ures.h"
@@ -509,9 +508,6 @@ IntlTest::setTestDirectory(const char* newDir)
  *                       ICU_DATA.  Common data isn't a problem, since it is
  *                       picked up via a static (build time) reference, but the
  *                       tests dynamically load some data.
- *
- *                       TODO:  The use of ICU_DATA can be eliminated once the proposed
- *                              udata_setApplicationData() API exists.
  */
 void IntlTest::setICU_DATA() {
     const char *original_ICU_DATA;
@@ -523,12 +519,13 @@ void IntlTest::setICU_DATA() {
     }
 
     /* U_SRCDATADIR is set by the makefiles on UNIXes when building cintltst and intltst
-     *              to point to the right place, "wherever/icu/source/data"
+     *              to point to "wherever/icu/data"
+	 *              We can make a path from there to "wherever/icu/source/data"
      *   The value is complete with quotes, so it can be used as-is as a string constant.
      */
 #if defined (U_SRCDATADIR)
     {
-        static char env_string[] = "ICU_DATA=" U_SRCDATADIR;
+        static char env_string[] = "ICU_DATA=" U_SRCDATADIR "/../source/data";
         putenv(env_string);
         return;
     }
diff --git a/icu4c/source/test/intltest/intltest.h b/icu4c/source/test/intltest/intltest.h
index 4d0c9d825d5..8c662933c13 100644
--- a/icu4c/source/test/intltest/intltest.h
+++ b/icu4c/source/test/intltest/intltest.h
@@ -158,7 +158,7 @@ protected:
     /*The function to get the Test Directory*/
     static const char* getTestDirectory(void);
 public:
-    static void IntlTest::setICU_DATA();       // Set up ICU_DATA if necessary.
+    static void setICU_DATA();       // Set up ICU_DATA if necessary.
 
 public:
     UBool run_phase2( char* name, char* par ); // internally, supports reporting memory leaks