# ------------------------------------
# This file is generated from setup.in
# ------------------------------------


# The tree layout with WITH_SRC is:
#
#   ooo/ [ pointed to by WITH_SRC ]
#     binutils-2.13
#     gcc-3.0.4
#     j2sdk1.3.1
#     ooo-build-$BUILD_VERSION
#     etc.

# this undetectable mess rocks:
ARCHITECTURE=unxlngi4.pro
BUILD_MAGIC=645

BUILD_WIN32=''
DISTRO='Momonga'
VENDORNAME='Momonga'
WITH_SRC=''
VERSION='1.1.2'
BINSUFFIX=''
CVSTAG='OOO_1_1_2'
BUILD_NCPUS='1'
CCACHE_ALLOWED='yes'
OOO_ICONS_VER='ooo-icons-OOO_1_1-9'
OOO_WIDGET_SETS='original'

# shrink this to ENUS,GERM for a faster build
LANGS="ENUS,FREN,GERM,SPAN,ITAL,DTCH,PORT,SWED,POL,RUSS";
LANGS="$LANGS,DAN,GREEK,TURK,CHINSIM,CHINTRAD,JAPN,KOREAN";
LANGS="$LANGS,CAT,CZECH,SLOVAK,FINN,ARAB";

if test "z$VERSION" != "z1.1.0"; then
	LANGS="$LANGS,HUNG,ESTONIAN,SLOVENIAN";
fi

if test "z$DISTRO" = "zRHFedora"; then
    CONFIGURE_OPTIONS="--with-lang=$LANGS	\
				--enable-libart		\
				--enable-libsn			\
				--enable-crashdump=no	\
				--enable-symbols=yes	\
				--enable-fontconfig		\
				--with-system-zlib		\
				--with-system-freetype	\
				--with-system-db \
				--disable-mozilla";

elif test "z$DISTRO" = "zArk"; then
    CONFIGURE_OPTIONS="--with-lang=$LANGS \
                       --enable-libart --enable-crashdump=no \
                       --without-fonts --with-system-zlib --enable-fontconfig \
                       --with-system-freetype --with-system-db \
                       --with-system-sane-headers \
                       --with-system-x11-extensions-headers \
                       --with-system-unixodbc-headers \
                       --with-system-curl --disable-mozilla\
                       --with-python=/usr/bin/python \
                       --with-system-xrender \
                       --with-widgetset=kde"

elif test "z$BUILD_WIN32" != "z"; then
    CONFIGURE_OPTIONS="--with-lang=$LANGS --with-use-shell=tcsh \
		       --enable-libart --enable-crashdump=no \
		       --disable-mozilla"

elif test "z$DISTRO" = "zMomonga"; then
    CONFIGURE_OPTIONS="--with-lang=$LANGS \
                     --enable-libart \
		     --enable-libsn \
		     --enable-crashdump=no \
                     --with-system-zlib \
		     --enable-fontconfig \
                     --with-system-freetype \
		     --with-system-db \
		     --disable-mozilla";

else
    if test "z$CONFIGURE_OPTIONS" = "z"; then
	CONFIGURE_OPTIONS="--with-lang=$LANGS \
		       --enable-libart --enable-libsn --enable-crashdump=no \
		       --without-fonts --disable-rpath \
		       --with-system-zlib --enable-fontconfig \
		       --with-system-freetype --disable-mozilla";
    else
	echo "Using configure options from the environment";
    fi
fi

# enable native file dialog for KDE
if test "z$DISTRO" = "zKDE"; then
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --enable-kde-fpicker"
fi

# no myspell dictionaries for SuSE
if test "z$DISTRO" = "zSuSE"; then
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --without-myspell-dicts"
fi

# build the default native widgets
if test "z${OOO_WIDGET_SETS%%,*}" != "zoriginal" ; then
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS \
		    --with-widgetset=${OOO_WIDGET_SETS%%,*}"
fi

ENABLE_BONOBO=
ENABLE_JAVA=no
JDK_HOME=
# Misc. internal
TOOLSDIR='/home/builduser/Momonga/STABLE_1/pkgs/openoffice.org/BUILD/ooo-build-1.1.60'
OODESTDIR=$DESTDIR
OOBUILDDIR='/home/builduser/Momonga/STABLE_1/pkgs/openoffice.org/BUILD/ooo-build-1.1.60/build/OOO_1_1_2'
SYSTEM_GCC='true'

# clobber bogus env vars. they badly screw things up
unset DESTDIR;
if test "z$CCACHE_ALLOWED" != "zyes" ; then
    unset CC;
    unset CXX;
fi
unset ERROR_FLAGS;
unset MAKE
unset WARN_CFLAGS

# Where to install to
PREFIXBASE=/usr
MANDIRBASE=/usr/share/man
PREFIX=$OODESTDIR$PREFIXBASE
MANDIR=$OODESTDIR$MANDIRBASE
SYSCONFBASE=/etc
SYSCONFDIR=$OODESTDIR$SYSCONFBASE
OOINSTBASE=/usr/lib/ooo-1.1
OOINSTDIR=$OODESTDIR$OOINSTBASE
OOOINSTALLDIRNAME=ooo-1.1
OOO_BUILD_EXTENSION='(build 60)'
SRCDIR=/home/builduser/Momonga/STABLE_1/pkgs/openoffice.org/BUILD/ooo-build-1.1.60/src
BUILDDIR=/home/builduser/Momonga/STABLE_1/pkgs/openoffice.org/BUILD/ooo-build-1.1.60/build
TCSH=/bin/tcsh

# setup paths
PATH="$BUILDDIR/bin:$PATH:$TOOLSDIR/bin"
if test "z$ENABLE_JAVA" = "zyes"; then
    if test "z$JDK_HOME" != "z"; then
        CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-jdk-home=$JDK_HOME"
        PATH="$JDK_HOME:$PATH"
    else
        PATH="$BUILDDIR/jdk/bin:$PATH"
    fi
else
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --disable-java"
fi

CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CONFIGURE_EXTRA_OPTIONS"

LD_LIBRARY_PATH="$BUILDDIR/lib:$LD_LIBRARY_PATH"

if test "z$CCACHE_DIR" = "z" ; then
    CCACHE_DIR=$BUILDDIR/.ccache
fi

# ---------------------------
#   Source / Version setup:
# ---------------------------
GCC_VER=gcc-3.2.2
GCC_TARBALL=gcc-3.2.2.tar.bz2
GCC_UNTAR_OPTIONS=jxf

BINUTILS_VER=binutils-2.13.2.1
BINUTILS_TARBALL=binutils-2.13.2.1.tar.bz2
BINUTILS_UNTAR_OPTIONS=jxf
BINUTILS_PATCH=$TOOLSDIR/patches/ld-2.13.2.1.diff

if test "z$ENABLE_JAVA" = "zyes"; then
    # If the user didn't specify the location of the JDK,
    # use builtin/downloaded one
    if test "z$JDK_HOME" = "z"; then
        JDK_VER=j2sdk1.4.1
        JDK_TARBALL=j2sdk-1.4.1-01-linux-i586-gcc3.2.tar.bz2
        JDK_UNTAR_OPTIONS=jxf
    fi
fi

if test "z$DISTRO" = "zArk"; then
    # The Ark Linux build system automatically recompresses
    # source files to bzip2
    OOO_ICONS_TARBALL=$OOO_ICONS_VER.tar.bz2
    OOO_ICONS_UNTAR_OPTIONS=xjf
else
    OOO_ICONS_TARBALL=$OOO_ICONS_VER.tar.gz
    OOO_ICONS_UNTAR_OPTIONS=xzf
fi

OOO_SCALED_ICONS_VER=ooo-scaled-icons
OOO_SCALED_ICONS_TARBALL=$OOO_SCALED_ICONS_VER.tar.gz
OOO_SCALED_ICONS_UNTAR_OPTIONS=xzf

OOO_TARBALL="$CVSTAG.tar.bz2"
OOO_UNTAR_OPTIONS=jxf

UNICOWS_SRC=$SRCDIR/unicows.exe;
DBGINST_SRC=$SRCDIR/dbghinst.EXE;
# ODMA_SRC=$SRCDIR/5_11_98Odma20.zip;


export LD_LIBRARY_PATH PATH CVSTAG
export CCACHE_DIR SRCDIR BUILDDIR OOBUILDDIR
export BUILD_FLAGS VERSION TOOLSDIR VENDORNAME
export PREFIX PREFIXBASE SYSCONFDIR SYSCONFBASE
export MANDIR MANDIRBASE
export OOINSTDIR OOINSTBASE OOOINSTALLDIRNAME
export OODESTDIR CONFIGURE_OPTIONS WITH_SRC DISTRO
export BINSUFFIX ARCHITECTURE BUILD_MAGIC
export ENABLE_BONODO BONOBODIR ENABLE_JAVA
export BUILD_WIN32 OOO_ICONS_VER
export OOO_BUILD_EXTENSION

echo "Setup:"
echo " Tag:        '$CVSTAG'"
echo " Flags:      '$BUILD_FLAGS'"
echo " Suffix:     '$BINSUFFIX'"
echo " Dir:        '$BUILDDIR'"
echo " DestDir:    '$DESTDIR'"
echo " Path:       '$PATH'"
echo " Prefix:     '$PREFIX'"
echo " Mandir:	   '$MANDIR'"
echo " Sysconf:    '$SYSCONFDIR'"
echo " OOInBase:   '$OOINSTBASE'"
echo " OOInstall:  '$OOINSTDIR'"
echo " OODestDir:  '$OODESTDIR'"
echo " Config:     '$CONFIGURE_OPTIONS'"
echo " OOo-Bonobo: '$ENABLE_BONOBO'"
echo " Icons:      '$OOO_ICONS_VER'"

if test "z$WITH_SRC" != "z"; then
	echo "Build environment:";
	set
fi
