#! /usr/bin/ksh # # ident "@(#)SUNW-build 1.8 03/12/10 SMI" # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # Sets options for building STSF for inclusion in Solaris # Only available flag is -64 to do a 64-bit build PATH=$PATH:/opt/sfw/bin export PATH MACH=`uname -p` ARCH=`arch | sed s/i86pc/i386/` DROPIN_FLAGS="" if [ "x${1}" == "x-64" ] ; then if [ "$MACH" == "sparc" ] ; then ARCH_CFLAGS="-xtarget=ultra2 -xarch=v9a" LIB_SUBDIR="/sparcv9" else echo "Don't know how to produce 64-bit code for $MACH platform." exit 1 fi if [ ! -x ../xc/config/util/mkshadow/mkshadow ] ; then (cd ../xc/config/util/mkshadow && xmkmf -a && make) fi if [ ! -d ../stsf-64 ] ; then mkdir ../stsf-64 fi cd ../stsf-64 echo 'Making 64-bit shadow hierarchy' ../xc/config/util/mkshadow/mkshadow -x '*.o' -x '*.so' -x '*.so.1' ../stsf DROPIN_FLAGS="--enable-dropins=no" fi DEBUG_FLAGS="--disable-debug-flags" if [ "x${1}" == "x-d" ] ; then DEBUG_FLAGS="--disable-optimizer-flags" fi chmod +x configure TARGETDIR=`pwd`"/../proto-${ARCH}-svr4/usr" LD_LIBRARY_PATH=${TARGETDIR}/lib${LIB_SUBDIR}:${TARGETDIR}/sfw/lib${LIB_SUBDIR}:${TARGETDIR}/lib/fontconfig${LIB_SUBDIR}:${LD_LIBRARY_PATH:-/usr/lib${LIB_SUBDIR}} export LD_LIBRARY_PATH CC=cc \ ARCH_CFLAGS="${ARCH_CFLAGS}" \ CPPFLAGS="-I${TARGETDIR}/include -I${TARGETDIR}/sfw/include -I${TARGETDIR}/sfw/include/freetype2" \ FTLDFLAGS="-L${TARGETDIR}/sfw/lib${LIB_SUBDIR} -R/usr/sfw/lib${LIB_SUBDIR}" \ ST_LIB_PATH="/usr/lib/ST${LIB_SUBDIR}" \ LIB_SUBDIR="${LIB_SUBDIR}" \ PKG_CONFIG_PATH="${TARGETDIR}/lib${LIB_SUBDIR}/pkgconfig" \ ./configure --prefix=/usr ${DEBUG_FLAGS} --enable-fontconfig --with-default-scaler-path=/usr/lib/ST/dropins${LIB_SUBDIR} ${DROPIN_FLAGS} gmake -k clean gmake -k LIB_SUBDIR="${LIB_SUBDIR}" TARGETSCALERDIR=${TARGETDIR}/lib/ST/dropins${LIB_SUBDIR} gmake -k install TARGETDIR=${TARGETDIR} TARGETLIBDIR="${TARGETDIR}/lib${LIB_SUBDIR}" TARGETSCALERDIR="${TARGETDIR}/lib/ST/dropins${LIB_SUBDIR}"