Index: Configure.pl
===================================================================
RCS file: /cvs/public/parrot/Configure.pl,v
retrieving revision 1.139
diff -u -b -r1.139 Configure.pl
--- Configure.pl	9 Apr 2004 20:31:51 -0000	1.139
+++ Configure.pl	12 Apr 2004 04:28:12 -0000
@@ -54,7 +54,7 @@
 You can add and remove option values with C<< :rem{<opt>} >> and
 C<< :add{<opt>} >>. For example:
 
-    perl Configure.pl --ccflags="rem{-g} :add{-O2}"
+    perl Configure.pl --ccflags=":rem{-g} :add{-O2}"
 
 =over
 
@@ -167,6 +167,10 @@
 be one of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is
 C<gc>.
 
+=item C<--icudatadir=(path)>
+
+Use the given directory to locate ICU's data file(s)
+
 =back
 
 Other Options (may not be implemented)
@@ -274,6 +278,8 @@
    --execcapable        Use JIT to emit a native executable
    --gc=(type)          Determine the type of garbage collection
                         type=(gc|libc|malloc|malloc-trace) default is gc
+
+   --icudatadir=(path)  Use the given directory to locate ICU's data file(s)
 
 Other Options (may not be implemented):
 
Index: config/gen/icu.pl
===================================================================
RCS file: /cvs/public/parrot/config/gen/icu.pl,v
retrieving revision 1.6
diff -u -b -r1.6 icu.pl
--- config/gen/icu.pl	10 Apr 2004 08:21:20 -0000	1.6
+++ config/gen/icu.pl	12 Apr 2004 04:28:12 -0000
@@ -20,10 +20,17 @@
 
 $description="Configuring ICU if requested...";
 
-@args=qw(buildicu verbose);
+@args=qw(buildicu verbose icudatadir);
 
 sub runstep {
-  my ($buildicu, $verbose) = @_;
+  my ($buildicu, $verbose, $icudatadir) = @_;
+
+  if( !defined $icudatadir )
+  {
+	  $icudatadir = 'blib/lib/icu/2.6.1';
+  }
+
+  Configure::Data->set( icudatadir => $icudatadir );
 
 #  unless ($buildicu) {
 #    print " [Skipped] " if $verbose;
Index: config/gen/config_h/config_h.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/config_h/config_h.in,v
retrieving revision 1.21
diff -u -b -r1.21 config_h.in
--- config/gen/config_h/config_h.in	10 Apr 2004 09:49:15 -0000	1.21
+++ config/gen/config_h/config_h.in	12 Apr 2004 04:28:12 -0000
@@ -134,6 +134,8 @@
 #define PARROT_CORE_CG_OPLIB_INIT Parrot_DynOp_core_cg_${MAJOR}_${MINOR}_${PATCH}
 #define PARROT_CORE_CGP_OPLIB_INIT Parrot_DynOp_core_cgp_${MAJOR}_${MINOR}_${PATCH}
 
+#define DEFAULT_ICU_DATA_DIR "${icudatadir}"
+
 #define INTVAL_FMT "${intvalfmt}"
 #define FLOATVAL_FMT "${floatvalfmt}"
 
Index: src/string.c
===================================================================
RCS file: /cvs/public/parrot/src/string.c,v
retrieving revision 1.185
diff -u -b -r1.185 string.c
--- src/string.c	11 Apr 2004 13:14:07 -0000	1.185
+++ src/string.c	12 Apr 2004 04:28:19 -0000
@@ -243,8 +243,9 @@
 void
 string_init(void)
 {
-/* XXXX: pull out into a config */
-    string_set_data_directory("blib/lib/icu/2.6.1");
+/* DEFAULT_ICU_DATA_DIR is configured at build time. Need a way to
+    specify this at runtime as well. */
+    string_set_data_directory(DEFAULT_ICU_DATA_DIR);
 /*
     encoding_init();
     chartype_init();
Index: src/string_primitives.c
===================================================================
RCS file: /cvs/public/parrot/src/string_primitives.c,v
retrieving revision 1.4
diff -u -b -r1.4 string_primitives.c
--- src/string_primitives.c	11 Apr 2004 13:14:07 -0000	1.4
+++ src/string_primitives.c	12 Apr 2004 04:28:25 -0000
@@ -41,6 +41,19 @@
 string_set_data_directory(const char *dir)
 {
     u_setDataDirectory(dir);
+    
+    /* Since u_setDataDirectory doesn't have a result code, we'll spot 
+       check that everything is okay by making sure that '9' had decimal
+       value 9. Using 57 rather than '9' so that the encoding of this
+       source code file isn't an issue.... (Don't want to get bitten by
+       EBCDIC.) */
+
+    if( !u_isdigit(57) || (u_charDigitValue(57) != 9) )
+    {
+            internal_exception(ICU_ERROR,
+                "string_set_data_directory: ICU data files not found"
+                "(apparently) for directory [%s]", dir);
+    }
 }
 
 /*
