Re: [xml] SunOs 5.8



Alexandre PASHAI wrote:

How to build libxml within 64 bits arch ???

_______________________________________________
xml mailing list
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml

I use the attached script to build libxml for different Solaris architectures. It's fairly self documenting. You can see the flags required to build 64-bit version (sparcv9).

Gary

--
Gary Pennington
Solaris Kernel Development,
Sun Microsystems
Gary Pennington sun com


#! /bin/ksh
#
# Author: Gary Pennington 2001.
# No warranties for this script are expressed, implied or otherwise.
# "THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
# THE USER."
#
# Description:
# This script works by building libxml in a prescribed build environment. It
# assumes the following:
# The variable NEW_LIBXML_VARIABLE will be set to a valid value for a build
# The variable OLD_LIBXML_VARIABLE will describe a directory to be removed
# LD should not be changed and points at the linker
# CFLAGS can be changed to pass in different flags to the compiler
# CC will be set depending on the build option chosen sparc|sparcv9|intel
# (sparcv9 (64 bit address space) not available before Solaris 7)
# If you have patches to apply create a subdir, ${NEW_LIBXML_VARIABLE}_patch
# and put them in there.  This process is a bit flaky but it should work.
#
# The script configures and makes libxml. On completion cd into the build
# directory and type make install to install.
# Change the install target by changing the lines with configure options
# near the end of the script.
#
# If using gcc, you need to change the CFLAGS and CC options appropriately.
#


OLD_LIBXML_VERSION=libxml2-2.4.0
NEW_LIBXML_VERSION=libxml2-2.4.3
export LD=/usr/ccs/bin/ld
export CFLAGS="-g"
#export CFLAGS="-xO3"

if [ $# != 1 ]
then
        echo "usage `basename $0` [sparc | sparcv9 | i386]"
        exit 1
fi

case "$1" in # check to see which platform we are building
        'sparc') CC="cc";;
        'i386') CC="cc";;
        'sparcv9') CC="cc -xarch=v9";;
        *)echo "usage `basename $0` [sparc | sparcv9 | i386]"; exit 1;;
esac
export CC

if [ -d ${OLD_LIBXML_VERSION} ]
then
        print "Removing old library"
        rm -rf ${OLD_LIBXML_VERSION}
else
        if [ -d ${NEW_LIBXML_VERSION} ]
        then
                print "Removing old copy"
                rm -rf ${NEW_LIBXML_VERSION}
        fi
fi

print "Extracting source archive"
gzip -dc ${NEW_LIBXML_VERSION}.tar.gz | tar -xf -

#Apply any patches in the patch dir for this release

if [ -d ${NEW_LIBXML_VERSION}_patch ]
then
        for file in `ls ${NEW_LIBXML_VERSION}_patch`
        do
                echo "patch file "$file
                patch -i ../${NEW_LIBXML_VERSION}_patch/$file -d ${NEW_LIBXML_VERSION}
        done
fi

cd ${NEW_LIBXML_VERSION}
print "Configuring for build"
./configure --prefix=/usr/local/libxml/ --exec-prefix /usr/local/libxml/$1

print "Making..."
make



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]