richter 01/10/31 00:24:57
Modified: . Tag: Embperl2c INSTALL.pod
driver Tag: Embperl2c epxalan.MAKEPL
Log:
Embperl 2 - compile with XALAN with sun C++ 5.1
Revision Changes Path
No revision
No revision
1.12.4.8 +71 -0 embperl/INSTALL.pod
Index: INSTALL.pod
===================================================================
RCS file: /home/cvs/embperl/INSTALL.pod,v
retrieving revision 1.12.4.7
retrieving revision 1.12.4.8
diff -u -r1.12.4.7 -r1.12.4.8
--- INSTALL.pod 2001/09/20 20:02:02 1.12.4.7
+++ INSTALL.pod 2001/10/31 08:24:57 1.12.4.8
@@ -91,6 +91,8 @@
Now you only have to enter the basepath of where you have extraced the
Xalan archive, when Makefile.PL asks you for it and proceed as normal.
+B<NOTE:> For special hints on compiling XALAN see below
+
To use libxml/libxslt, download them from http://xmlsoft.org/ and install
them on your system. Makefile.PL will automaticly detect the installed
libraries and linked them into Embperl. (you have to make sure
@@ -333,4 +335,73 @@
or you can view it online on http://www.ecos.de/embperl/
+
+=head2 Compiling XALAN
+
+Normaly you should be fine with the binary packages that are provided for
+XALAN. If you want to compile XALAN from the sources there should be normaly
+no problem as long as you use GNU gcc on Unix or Microsoft VC++ on Windows.
+
+Here are some hints how to compile XALAN 1.2 with the sun C++ 5.1:
+
+=over 4
+
+=item * Get the sources for XERCES and XALAN
+
+=item * Untar the files
+
+Use GNU tar, solaris tar doesn't work! GNU tar can be found at
+ftp://ftp.mcc.ac.uk/pub/gnu/tar/tar-1.13.tar.gz
+
+=item * Set the root directories
+
+ export XERCESCROOT=/path/to/xerces-c-src1_5_1
+ export XALANCROOT=/path/to/xml-xalan/c
+
+=item * Compile XERCES
+
+ cd xerces-c-src1_5_1/src
+ sh runConfigure -p solaris -c cc -x CC
+ make
+
+=item * Patch XALAN
+
+There must be one typecast inserted in the following three files:
+
+
+ "c/src/XSLT/ExtensionFunctionHandler.cpp", line 156
+ 156c156
+ < return m_functions.find(function) != m_functions.end();
+ ---
+ > return StringSetType::const_iterator(m_functions.find(function)) !=
m_functions.end();
+
+ "c/src/XSLT/ExtensionNSHandler.cpp", line 200
+ 200c200
+ < return (m_elements.find(element) != m_elements.end());
+ ---
+ > return (ExtensionSetType::const_iterator(m_elements.find(element)) !=
m_elements.end());
+
+ "c/src/XSLT/NamespacesHandler.cpp", line 366
+ 366c366
+ < || m_extensionNamespaceURIs.find(theURI) !=
m_extensionNamespaceURIs.end()
+ ---
+ > ||
ExtensionNamespaceURISetType::const_iterator(m_extensionNamespaceURIs.find(theURI)) !=
m_extensionNamespaceURIs.end()
+
+
+
+=item * Compile XALAN
+
+ cd xml-xalan/c/src
+ sh runConfigure -p solaris -c cc -x CC -z "-D__GNUC__"
+ make
+
+B<NOTE:> I found that only the above parameters to configure work.
+Don't worry that __GNUC__ is defined. It works with sun C++ 5.1.
+When using sun C++ 5.1 you don't need the STLPort template library.
+
+=item * Make the libraries available
+
+ export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/xerces-c-src1_5_1/lib:/path/to/xml-xalan/c/lib
+
+=item * Now you can run Embperl's Makefile.PL as described above
No revision
No revision
1.1.2.8 +39 -34 embperl/driver/Attic/epxalan.MAKEPL
Index: epxalan.MAKEPL
===================================================================
RCS file: /home/cvs/embperl/driver/Attic/epxalan.MAKEPL,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- epxalan.MAKEPL 2001/10/17 13:11:25 1.1.2.7
+++ epxalan.MAKEPL 2001/10/31 08:24:57 1.1.2.8
@@ -60,33 +60,36 @@
print "Found Xalan library $xalanlib at $xalanlibpath\n" ;
print "Found Xerces library $xerceslib at $xerceslibpath\n" ;
+ my $platform ;
+ my $cpp ;
+ my $cppflags ;
+ my $makefile = "$path/src/Makefile" ;
+ my $extralibs = '' ;
+
+ if (-f $makefile)
+ {
+ $platform = search_config ('PLATFORM', $makefile) ;
+ $cpp = search_config ('CXX', $makefile) ;
+ $cppflags = search_config ('CXXFLAGS', $makefile) ;
+
+ $extralibs = '-lCrun -lCstd' if ($platform eq 'SOLARIS' && $cpp eq 'CC') ;
+
+ print "Found XALAN was build for '$platform', C++ Compiler is $cpp, with
flags $cppflags\n" ;
+ }
+ else
+ {
+ print "Makefile for XALAN not found. Assuming prebuild version using
defaults\n" ;
+ print "!!! NOTE: If you get compiler errors when build epxalan.cpp, try to
build\n" ;
+ print "!!! XALAN from the sources. See INSTALL.XALAN.pod\n\n" ;
+ }
+
+
"$xalanlib $xerceslib" =~ /^lib(.*?)\.so lib(.*?)\.so$/ ;
-
- my $platform ;
- my $cpp ;
- my $cppflags ;
- my $makefile = "$path/src/Makefile" ;
- if (-f $makefile)
- {
- $platform = search_config ('PLATFORM', $makefile) ;
- $cpp = search_config ('CXX', $makefile) ;
- $cppflags = search_config ('CXXFLAGS', $makefile) ;
-
- print "Found XALAN was build for '$platform', C++ Compiler is $cpp, with
flags $cppflags\n" ;
- }
- else
- {
- print "Makefile for XALAN not found. Assuming prebuild version using
defaults\n" ;
- print "!!! NOTE: If you get compiler errors when build epxalan.cpp, try to
build\n" ;
- print "!!! XALAN from the sources. See INSTALL.XALAN.pod\n\n" ;
- }
-
-
return { cflags => "-I$path/src -I$xerceslibpath/../include -D_REENTRANT " ,
- cpp => $cpp,
- cppflags => $cppflags,
- libs => "-L$xalanlibpath -L$xerceslibpath -l$1 -l$2",
+ cpp => $cpp,
+ cppflags => $cppflags,
+ libs => "-L$xalanlibpath -L$xerceslibpath -l$1 -l$2 $extralibs",
defines => '-DXALAN' . ($platform?" -D$platform":'') ,
objects => 'driver/epxalan$(OBJ_EXT)',
save => { '$XALANPATH' => $path }} ;
@@ -99,11 +102,12 @@
sub xalanlib
{
- if ($File::Find::dir =~ m#/\.#)
- {
- $File::Find::prune = 1 ;
- return ;
- }
+ if ($File::Find::dir =~ m#/\.#)
+ {
+ $File::Find::prune = 1 ;
+ return ;
+ }
+
if (/^libxalan.*\.so/)
{
$xalanlibpath = $File::Find::dir ;
@@ -115,11 +119,12 @@
sub xerceslib
{
- if ($File::Find::dir =~ m#/\.#)
- {
- $File::Find::prune = 1 ;
- return ;
- }
+ if ($File::Find::dir =~ m#/\.#)
+ {
+ $File::Find::prune = 1 ;
+ return ;
+ }
+
if (/^libxerces.*\.so/)
{
$xerceslibpath = $File::Find::dir ;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]