# ------------------------------------
# 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.

BUILD_WIN32=''
DISTRO='NLD'
VENDORNAME='OpenOffice'
WITH_SRC=''
SRCDIR=/home/doko/ooo/gcj/openoffice.org2-1.9.76/ooo-build/src
VERSION='1.9.0'
BINSUFFIX='1.9'
OOO_LANGS='en-US'
CVSTAG='src680-m79'
APPLY_DIR='/home/doko/ooo/gcj/openoffice.org2-1.9.76/ooo-build/patches/src680-m79'
BUILD_NCPUS='1'
ENABLE_CCACHE=''
ENABLE_ICECREAM=''
ICECREAM_JOBS='10'
ICECREAM_BINDIR='/opt/icecream/bin'
OOO_WIDGET_FLAGS='--enable-gtk --enable-kde '
WITH_ICONS='industrial crystal'
OOO_CUSTOM_IMAGES='ooo_custom_images-12.tar.bz2'
OOO_CRYSTAL_IMAGES='ooo_crystal_images-4.tar.bz2'
OOO_BUILDVERSION='1.9.79.2'
RUN_POST_INSTALL_SCRIPTS='yes'
TOOLSDIR='/home/doko/ooo/gcj/openoffice.org2-1.9.76/ooo-build'

if test "z$BUILD_WIN32" != "z"; then
    CONFIGURE_OPTIONS="--with-lang=\"$OOO_LANGS\" --with-use-shell=tcsh \
		       --without-gpc --enable-crashdump=no \
		       --disable-directx \
		       --disable-binfilter --without-myspell-dicts"

else
    # We pull config options in from distro-specific config files, if present
    if test "z$DISTRO" != "z"; then
	COMMON_OPTIONS="`cat $TOOLSDIR/distro-configs/Common.conf |xargs`";
        if test -f "$TOOLSDIR/distro-configs/$DISTRO.conf"; then
            CONFIGURE_OPTIONS="`cat $TOOLSDIR/distro-configs/$DISTRO.conf |xargs`";
        else
            echo "Could not find the distribution specific configure options"
            echo "    file in $TOOLSDIR/distro-configs/. Continuing with defaults."
        fi
	CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $COMMON_OPTIONS"
    fi
    if test "z$CONFIGURE_OPTIONS" = "z"; then
# default non-Win32 options
	CONFIGURE_OPTIONS="--with-system-gcc --with-jdk-home=/usr/lib/SunJava2-1.4.2 \
			   --with-lang=\"$OOO_LANGS\" --without-gpc --enable-libsn --enable-crashdump=no \
			   --with-system-zlib --with-system-freetype --with-system-jpeg \
			   --without-fonts --enable-fontconfig \
			   --with-ant-home=/usr/share/ant --disable-crashdump \
			   --with-system-python --disable-binfilter \
			   --with-system-mozilla \
			   --disable-epm --without-myspell-dicts \
			   --with-system-libxml \
			   --with-build-version=\"Build $OOO_BUILDVERSION\"";
    else
	echo "Using configure options from the environment";
    fi
fi

# build the right native widgets
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $OOO_WIDGET_FLAGS"

if test "z$WITH_ICONS" != "z"; then
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-images='$WITH_ICONS'"
fi


ENABLE_BONOBO=
ENABLE_JAVA=yes
JDK_HOME=
# Misc. internal
TOOLSDIR='/home/doko/ooo/gcj/openoffice.org2-1.9.76/ooo-build'
OOBUILDDIR='/home/doko/ooo/gcj/openoffice.org2-1.9.76/ooo-build/build/src680-m79'
SYSTEM_GCC='true'
FORCE_GCC33=''
# the variable DESTDIR will be unset to do not break build, etc.
# the test allows to source setup twice
test "z$DESTDIR" = "z" || OODESTDIR=$DESTDIR

if test "z$SYSTEM_GCC" = "ztrue"; then
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --with-system-stdlibs"
fi

# clobber bogus env vars. they badly screw things up
unset DESTDIR;
unset CC;
unset CXX;
unset ERROR_FLAGS;
unset MAKE
unset WARN_CFLAGS

# Where to install to
prefix=/usr
PREFIXBASE=/usr
MANDIRBASE=${prefix}/man
DOCDIRBASE=${prefix}/share/doc/packages/OpenOffice.org
PREFIX=$OODESTDIR$PREFIXBASE
MANDIR=$OODESTDIR$MANDIRBASE
DOCDIR=$OODESTDIR$DOCDIRBASE
SYSCONFBASE=${prefix}/etc
SYSCONFDIR=$OODESTDIR$SYSCONFBASE
OOINSTBASE=/usr/lib/ooo-1.9
OOINSTDIR=$OODESTDIR$OOINSTBASE
OOOINSTALLDIRNAME=ooo-1.9
OOO_BUILD_EXTENSION='(build 79.2)'
BUILDDIR=/home/doko/ooo/gcj/openoffice.org2-1.9.76/ooo-build/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 --without-java"
fi

CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $CONFIGURE_EXTRA_OPTIONS"

LD_LIBRARY_PATH="$BUILDDIR/lib:/opt/mozilla/lib:$LD_LIBRARY_PATH"

# gcc speedup
case "$ENABLE_CCACHE/$ENABLE_ICECREAM" in
    "yes/")
        export CC="ccache gcc"
        export CXX="ccache g++"
        ;;

    "/yes")
        export CC="$ICECREAM_BINDIR/gcc"
        export CXX="$ICECREAM_BINDIR/g++"
        ;;

    "yes/yes")
        export CC="ccache $ICECREAM_BINDIR/gcc"
        export CXX="ccache $ICECREAM_BINDIR/g++"
        ;;
esac

# Icecream should use the internal gcc, if we want it
if test "z$ENABLE_ICECREAM" != "z" -a "z$SYSTEM_GCC" = "z" ; then
    if test -x "$BUILDDIR/bin/gcc"; then
        pushd "$BUILDDIR" > /dev/null
        ICE_TAR_NAME=`create-env --respect-path | grep '^creating ' | sed 's/^creating //'`
        popd > /dev/null
        export ICECC_VERSION="$BUILDDIR/$ICE_TAR_NAME"
    fi
fi

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

# how to mark config files in file lists
if test "z$DISTRO" = "zNLD" -o "z$DISTRO" = "zSUSE" -o "z$VENDORNAME" = "zRedHat"; then
    RPM_CONFIG_FILE_TAGS="%config"
elif test "z$DISTRO" = "zPLD" ; then
    RPM_CONFIG_FILE_TAGS="%config(noreplace) %verify(not md5 size mtime)"
fi

# Tag file lists with language (for RPM)
if test "z$VENDORNAME" = "zRedHat"; then
    RPM_TAG_LANGPACKS=TRUE
fi


# ---------------------------
#   Source / Version setup:
# ---------------------------
GCC_VER=gcc-3.4.1
GCC_TARBALL=gcc-3.4.1.tar.bz2
GCC_UNTAR_OPTIONS=jxf
GCC_PATCHES="gcc-3.4.1-Enums.diff gcc-3.4.1-VisibilityPatch2.diff"

BINUTILS_VER=
BINUTILS_TARBALL=
BINUTILS_UNTAR_OPTIONS=
BINUTILS_PATCH=

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-core.tar.bz2"
OOO_SYSTEM_TARBALL="$CVSTAG-system.tar.bz2"
OOO_EXTRA_ARTWORK="extras-1.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 APPLY_DIR
export CCACHE_DIR SRCDIR BUILDDIR OOBUILDDIR
export BUILD_FLAGS VERSION TOOLSDIR VENDORNAME
export PREFIX PREFIXBASE SYSCONFDIR SYSCONFBASE
export MANDIR MANDIRBASE DOCDIR DOCDIRBASE
export OOINSTDIR OOINSTBASE OOOINSTALLDIRNAME
export OODESTDIR OOO_LANGS CONFIGURE_OPTIONS WITH_SRC
export DISTRO BINSUFFIX ARCHITECTURE BUILD_MAGIC
export ENABLE_BONODO BONOBODIR ENABLE_JAVA
export BUILD_WIN32 
export OOO_BUILD_EXTENSION
export FORCE_GCC33

if test "z$RPM_TAG_LANGPACKS" != "z"; then
export RPM_TAG_LANGPACKS
fi

echo "Setup:"
echo " Tag:        '$CVSTAG'"
echo " Apply:      '$APPLY_DIR/apply'"
echo " Flags:      '$BUILD_FLAGS'"
echo " Suffix:     '$BINSUFFIX'"
echo " Dir:        '$BUILDDIR'"
echo " DestDir:    '$DESTDIR'"
echo " Path:       '$PATH'"
echo " Prefix:     '$PREFIX'"
echo " Mandir:     '$MANDIR'"
echo " Docdir:     '$DOCDIR'"
echo " Sysconf:    '$SYSCONFDIR'"
echo " OOInBase:   '$OOINSTBASE'"
echo " OOInstall:  '$OOINSTDIR'"
echo " OODestDir:  '$OODESTDIR'"
echo " Config:     '$CONFIGURE_OPTIONS'"
echo " OOo-Bonobo: '$ENABLE_BONOBO'"
echo " Use gcc33:  '$FORCE_GCC33'"
if test "$ENABLE_CCACHE" = "yes"; then
    echo " ccache:     yes, ccache directory is '$CCACHE_DIR'"
else
    echo " ccache:     no"
fi
if test "$ENABLE_ICECREAM" = "yes"; then
    echo " icecream:   yes, in '$ICECREAM_BINDIR'. Max number of jobs is '$ICECREAM_JOBS'"
    if test "z$ICECC_VERSION" != "z"; then
        echo " icecream:   using '$ICECC_VERSION' compiler tarball."
    fi
else
    echo " icecream:   no"
fi

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