Permalink
Browse files

ICU config patch - use systems ICU

git-svn-id: https://svn.parrot.org/parrot/trunk@5904 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 5a9e89c commit dacbc40636680ae82f2bc3a5e6de894118b64994 Leopold Toetsch committed Apr 21, 2004
Showing with 49 additions and 3 deletions.
  1. +28 −1 Configure.pl
  2. +21 −2 config/gen/icu.pl
View
@@ -36,7 +36,7 @@ =head2 Command-line Options
=item C<--verbose=2>
-Tells Configure.pl to output information about i<every> setting added or
+Tells Configure.pl to output information about i<every> setting added or
changed.
=item C<--nomanicheck>
@@ -185,6 +185,28 @@ =head2 Command-line Options
Use the given directory to locate ICU's data file(s) at runtime
+If you have an installed unicode package, you can use these two options instead:
+
+=item C<--icushared=(linkeroption)>
+
+Linker command to link against ICU library version 2.6.
+
+E.g.
+
+ --icushared='-L /opt/openoffice/program -licudata -licuuc'
+
+(The libs in openoffice are actually version 2.2 and do not work)
+
+=item C<--icuheaders=(header_dir)>
+
+Location of ICU header files without the /unicode suffix. The header files must match your platform, especially F<platform.h> must be present.
+
+E.g.
+
+--icuheaders='/home/lt/icu/'
+
+You might also need '--nomanicheck'.
+
=back
Other Options (may not be implemented)
@@ -299,6 +321,11 @@ END
--icuconfigureargs=(args) Arguments to pass to ICU's configuration script
--icudatadir=(path) Directory to locate ICU's data file(s)
+ For using a system ICU, these options can be used
+
+ --icuheaders=(header_dir) Location of headers w/o /unicode
+ --icushared=(linkeroption)> Full linker command
+
Other Options (may not be implemented):
--maintainer Create imcc's parser and lexer files. Needs a working
View
@@ -20,11 +20,30 @@ package Configure::Step;
$description="Configuring ICU if requested...";
-@args=qw(buildicu verbose icudatadir icuplatform icuconfigureargs);
+@args=qw(buildicu verbose icudatadir icuplatform icuconfigureargs
+ icushared icuheaders);
sub runstep {
- my ($buildicu, $verbose, $icudatadir, $icuplatform, $icuconfigureargs) = @_;
+ my ($buildicu, $verbose, $icudatadir, $icuplatform, $icuconfigureargs,
+ $icushared, $icuheaders) = @_;
my $icu_configure_command;
+ my @icu_headers = qw(ucnv.h utypes.h uchar.h);
+
+ if (defined($icushared) && defined($icuheaders)) {
+ $icuheaders =~ s![\\/]$!!;
+ my $c_libs = Configure::Data->get('libs');
+ $c_libs .= " $icushared";
+ Configure::Data->set(
+ icu_headers => join(' ', map {"$icuheaders/unicode/$_"} @icu_headers),
+ blib_lib_libsicuuc_a => '',
+ blib_lib_libsicudata_a => '',
+ libs => $c_libs,
+ cc_inc => Configure::Data->get(qw(cc_inc))." -I$icuheaders",
+ icudatadir => '',
+ TEMP_icu_make => ''
+ );
+ return;
+ }
if( !defined $icudatadir )
{

0 comments on commit dacbc40

Please sign in to comment.