summaryrefslogtreecommitdiff
path: root/configure
Unidiff
Diffstat (limited to 'configure') (more/less context) (show whitespace changes)
-rwxr-xr-xconfigure304
1 files changed, 0 insertions, 304 deletions
diff --git a/configure b/configure
deleted file mode 100755
index b7cb702..0000000
--- a/configure
+++ b/dev/null
@@ -1,304 +0,0 @@
1#!/bin/sh
2#
3# Configures to build the Qtopia Environment
4#
5# Copyright 1999-2000 Trolltech AS. All rights reserved.
6#
7
8PLATFORM=generic
9SHARING=shared
10DEBUG=
11QCONFIGARG=
12
13touch .test.qpe.
14if [ '!' -f ${OPIEDIR}/.test.qpe. ];
15then
16 rm .test.qpe.
17 echo
18 echo
19 echo ' The environment variable $OPIEDIR is not set correctly. It is currently'
20 echo ' set to "'$OPIEDIR'", but it should be set to this directory,'
21 echo ' which is "'`pwd`'".'
22 echo
23 echo ' Please read the INSTALL file for instructions on how to set $OPIEDIR'
24 echo ' correctly. If you have set $OPIEDIR in your .profile or .login, you '
25 echo ' will need to log out and log in again to make the setting effective.'
26 echo
27 echo
28 exit 1
29fi
30rm .test.qpe.
31
32if [ '!' -f $TMAKEPATH/tmake.conf ]
33then
34 # You have tmake. We'll regenerate the file for you...
35 echo ' The environment variable $TMAKEPATH is not set correclty. '
36 echo ' It should be set to the tmake path'
37 echo
38 echo ' Please read the INSTALL file for instructions on how to set $TMAKEPATH'
39 echo ' to the environment variable correctly.'
40 exit 1
41fi
42
43VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <library/version.h)
44VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <library/version.h)
45VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <library/version.h)
46
47TOMAKE=
48
49if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h
50then
51 QT3=yes
52else
53 QT3=no
54fi
55
56# Parse the arguments, setting things to "yes" or "no".
57
58while [ -n "$1" ]; do
59 case $1 in
60 -platform|-xplatform) # No difference since we don't need to build moc, etc.
61 shift; PLATFORM=$1
62 ;;
63 -release)
64 DEBUG=
65 ;;
66 -debug)
67 DEBUG=-debug
68 ;;
69 -shared)
70 SHARING=shared
71 ;;
72 -static)
73 SHARING=static
74 ;;
75 -qconfig)
76 # optional way to specify the qconfig-qpe.h is to pass -qconfig qpe
77 shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that.
78 ;;
79 -make)
80 shift; TOMAKE="$TOMAKE $1"
81 ;;
82 -qt3)
83 QT3=yes
84 ;;
85 *)
86 HELP=yes;;
87 esac
88 shift
89done
90
91TARGET=configs/$PLATFORM-$SHARING$DEBUG
92
93if [ '!' -f $TARGET ]
94then
95 if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ]
96 then
97 TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG
98 PLATFORM=linux-$PLATFORM-g++
99 else
100 echo
101 echo ' The specified platform/compiler not supported: ' $TARGET
102 echo
103 exit 2
104 fi
105fi
106
107# Next, emit a usage message if something failed.
108
109if [ "$HELP" = "yes" ]; then
110 cat <<EOF
111Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...]
112
113The defaults (*) are usually acceptable. Here is a short explanation of
114each option:
115
116 * -release ........... Compile and link Qt with debugging turned off.
117 -debug ............. Compile and link Qt with debugging turned on.
118
119 * -shared ............ Create and use a shared Qt library (libqt.so)
120 -static ............ Create and use a static Qt library (libqt.a)
121
122 -qt3 ............... Configure for use with Qt 3.x
123
124 -platform target ... The platform you are building on ($PLATFORM)
125EOF
126 exit 0;
127fi
128
129CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"`
130
131if [ -f library/custom-$CUSTOM.h ]
132then
133 rm -f library/custom.h
134 ln -s custom-$CUSTOM.h library/custom.h
135fi
136
137mkdir -p include/qpe
138( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; )
139mkdir -p include/qtopia
140( cd include/qtopia && rm -f *.h; ln -s ../../library/*.h .; )
141mkdir -p include/qtopia/private
142( cd include/qtopia/private && rm -f *.h; ln -s ../../../library/backend/*.h .; )
143mkdir -p include/opie
144( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; )
145( cd include/opie && ln -s ../../libsql/*.h .; )
146( cd include/opie && ln -s ../../libopie/pim/*.h .; )
147( cd include/opie; for generatedHeader in `cd ../../libopie; ls *.ui | sed -e "s,\.ui,\.h,g"`; do \
148 ln -sf ../../libopie/$generatedHeader $generatedHeader; done )
149
150echo Creating makefiles...
151
152# Set version for library directly
153# Version 1.5.0 right now for compat.
154sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v
155mv library/library.pro-v library/library.pro
156
157if [ "$QT3" = yes ]
158then
159 VCONFIG="CONFIG+=qt3"
160else
161 VCONFIG="CONFIG+=qt2"
162fi
163
164if [ -f $TMAKEPATH/tmake.conf ]
165then
166 # You have tmake. We'll regenerate the file for you...
167 echo "Makefiles will be regenerated."
168fi
169
170H=`pwd`
171if [ -z "$TOMAKE" ]
172then
173 TOMAKE=`make showcomponents`
174fi
175
176for a in $TOMAKE ; do
177 N=$a/Makefile
178 M=$a/Makefile.in
179 O=$a/Makefile.add
180 f=`basename $a`
181
182 if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ]
183 then
184 ( cd $a;
185 TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \
186 tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \
187 -t $H/qt/tmake/propagate.t $f.pro |
188 sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in;
189 )
190 echo -n "."
191 #echo Building $N..
192 appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"`
193 translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' `
194 if [ -n "$translation" -a -n "$appname" ]
195 then
196 if [ "$appname" != "$translation" ]
197 then
198 echo
199 echo "Warning: translation and appname disagree in $a/$f.pro"
200 fi
201 fi
202
203 fi
204
205 cat > $N <<EOF
206#############################################################################
207# Automatically generated from $M
208# Build options from $1
209#############################################################################
210
211EOF
212
213 SED=
214 PLATFORM_CFLAGS=
215
216 if [ "$f" = "embeddedkonsole" ]
217 then
218 case $PLATFORM in
219 *x86*|*generic*|*ipaq*|*oz*|*sharp*)
220 SED="$SED /^LIBS.*=/s/\$/ -lutil/;"
221 PLATFORM_CFLAGS="-DHAVE_OPENPTY"
222 ;; *)
223 SED=
224 esac
225 elif [ "$f" = "libmpeg3" ]
226 then
227 # Patch our Makefile.in file with the platform specifics for the libmpeg3 library
228 # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code)
229 SED='s/\$(CC)/\$(CXX)/;'
230 case $PLATFORM
231 in
232 # For x86 turn on using floating point, compile mmx and css code
233 *x86*)
234 # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486"
235 PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS"
236 SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;"
237 # For generic turn on using floating point
238 ;; *generic*)
239 PLATFORM_CFLAGS=""
240 # For the ipaq use fixed point maths, don't compile the mmx or css code
241 ;; *ipaq*|*oz*|*sharp*)
242 PLATFORM_CFLAGS="-DUSE_FIXED_POINT"
243 ;; *)
244 # For 'other platforms', turn off optimizations and use fixed point
245 PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT"
246 esac
247 elif [ "$f" = "libmad" ]
248 then
249 # Patch our Makefile.in file with the platform specifics for the libmad library
250 case $PLATFORM
251 in
252 # For x86 use intel optimizations
253 *x86*)
254 PLATFORM_CFLAGS="-DFPM_INTEL"
255 # For the ipaq use ARM asm optimizations
256 ;; *ipaq*|*oz*|*sharp*)
257 PLATFORM_CFLAGS="-DFPM_ARM"
258 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;"
259 # For generic platforms use the C 64-bit implementation
260 ;; *generic*)
261 PLATFORM_CFLAGS="-DFPM_64BIT"
262 # For 'other platforms' use the ARM code
263 ;; *)
264 PLATFORM_CFLAGS="-DFPM_ARM"
265 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;"
266 esac
267 fi
268 SED="$SED /LFLAGS.*=.*/s/\$/ $EXTRA $EXTRALIBS/;"
269 PLATFORM_CFLAGS="$PLATFORM_CFLAGS $EXTRAFLAGS";
270 if [ -n "$PLATFORM_CFLAGS" ]
271 then
272 # Append the addition c-flags we have defined
273 SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;"
274 SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS -fpermissive/;"
275 fi
276 cat $TARGET >> $N
277 if [ -n "$SED" ]
278 then
279 sed -e "$SED" $M >> $N
280 else
281 cat $M >> $N
282 fi
283
284 cat >> $N <<EOF
285
286lupdate:
287 lupdate -noobsolete $f.pro
288
289lrelease:
290 lrelease $f.pro
291
292EOF
293 if [ -f "$O" ]
294 then
295 cat >> $N $O
296 fi
297
298done
299
300MAKE=make
301echo
302echo "Opie is now configured for building. Just run $MAKE (or $MAKE single)."
303echo "To reconfigure, run $MAKE clean and configure."
304echo