summaryrefslogtreecommitdiff
path: root/bin/setup.in
blob: 331eda47bb6a255a9563e285f6f0215875ebded9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# ------------------------------------
# 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='@BUILD_WIN32@'
DISTRO='@DISTRO@'
VENDORNAME='@VENDORNAME@'
WITH_SRC='@WITH_SRC@'
VERSION='@OOO_VERSION@'
BINSUFFIX='@OOO_BINSUFFIX@'
CVSTAG='@CVSTAG@'
APPLY_DIR='@APPLY_DIR@'
BUILD_NCPUS='@BUILD_NCPUS@'
BUILD_JOBS='@BUILD_JOBS@'
CCACHE_ALLOWED='@CCACHE_ALLOWED@'
OOO_ICONS_VERS='@OOO_ICONS_VERS@'
OOO_ICONS_NAMES='@OOO_ICONS_NAMES@'
OOO_WIDGET_FLAGS='@OOO_WIDGET_FLAGS@'
OOO_BUILDVERSION='@OOO_BUILDVERSION@'

# 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=ALL		\
				--enable-libart		\
				--enable-libsn			\
				--enable-crashdump=no	\
				--enable-symbols=yes	\
				--enable-fontconfig		\
				--with-system-zlib		\
				--with-system-freetype	\
				--with-system-db		\
				--with-db-version=4.2	\
				--without-fonts		\
				--enable-gtk			\
				--enable-kde			\
				--disable-mozilla";

elif test "z$DISTRO" = "zRHEL3"; then
    CONFIGURE_OPTIONS="--with-lang=ALL		\
				--enable-libart		\
				--enable-libsn			\
				--enable-crashdump=no	\
				--enable-symbols=yes	\
				--enable-fontconfig		\
				--with-system-zlib		\
				--with-system-freetype	\
				--with-system-db		\
				--with-db-version=4.1	\
				--without-fonts		\
				--disable-mozilla";

elif test "z$DISTRO" = "zRHL9"; then
    CONFIGURE_OPTIONS="--with-lang=ALL		\
				--enable-libart		\
				--enable-libsn			\
				--enable-crashdump=no	\
				--enable-symbols=yes	\
				--enable-fontconfig		\
				--with-system-zlib		\
				--with-system-freetype	\
				--with-system-db		\
				--with-db-version=4.1	\
				--without-fonts		\
				--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 \
                       --enable-kde"

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

else
    if test "z$CONFIGURE_OPTIONS" = "z"; then
	if [ -s ./setup.configure ]; then
		. ./setup.configure
		echo "Using configure options from the ./setup.configure file";
	else
		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 \
			       --enable-kde --enable-gtk";
	fi
    else
	echo "CONFIGURE_OPTIONS=\"`echo \"$CONFIGURE_OPTIONS\" | xargs`\"" > ./setup.configure
	echo "Using configure options from the environment";
    fi
fi

# no myspell dictionaries for SUSE and NLD
if test "z$DISTRO" = "zSUSE" -o "z$DISTRO" = "zNLD" ; then
    CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS --without-myspell-dicts"
fi

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

ENABLE_BONOBO=@ENABLE_BONOBO@
ENABLE_JAVA=@ENABLE_JAVA@
JDK_HOME=@JDK_HOME@
# Misc. internal
TOOLSDIR='@TOOLSDIR@'
OOBUILDDIR='@OOBUILDDIR@'
SYSTEM_GCC='@SYSTEM_GCC@'
FORCE_GCC33='@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

# 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=@prefix@
MANDIRBASE=@mandir@
DOCDIRBASE=@docdir@
PREFIX=$OODESTDIR$PREFIXBASE
MANDIR=$OODESTDIR$MANDIRBASE
DOCDIR=$OODESTDIR$DOCDIRBASE
SYSCONFBASE=@sysconfdir@
SYSCONFDIR=$OODESTDIR$SYSCONFBASE
OOINSTBASE=@prefix@/lib/@OOOINSTALLDIRNAME@
OOINSTDIR=$OODESTDIR$OOINSTBASE
OOOINSTALLDIRNAME=@OOOINSTALLDIRNAME@
OOO_BUILD_EXTENSION='@OOO_BUILD_EXTENSION@'
SRCDIR=@SRCDIR@
BUILDDIR=@BUILDDIR@
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

# 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.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_SUFFIX=tar.bz2
    OOO_ICONS_UNTAR_OPTIONS=xjf
else
    OOO_ICONS_TARBALL_SUFFIX=tar.gz
    OOO_ICONS_UNTAR_OPTIONS=xzf
fi

OOO_ICONS_TARBALLS=""
for ooo_icons_ver in $OOO_ICONS_VERS ; do
    if test "z$OOO_ICONS_TARBALLS" = "z" ; then
	OOO_ICONS_TARBALLS="$ooo_icons_ver.$OOO_ICONS_TARBALL_SUFFIX"
    else
	OOO_ICONS_TARBALLS="$OOO_ICONS_TARBALLS $ooo_icons_ver.$OOO_ICONS_TARBALL_SUFFIX"
    fi
done

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 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 CONFIGURE_OPTIONS WITH_SRC DISTRO
export BINSUFFIX ARCHITECTURE BUILD_MAGIC
export ENABLE_BONODO BONOBODIR ENABLE_JAVA
export BUILD_WIN32 OOO_ICONS_VERS
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 " Icons:      '$OOO_ICONS_NAMES'"
echo " Use gcc33:  '$FORCE_GCC33'"

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