Diffstat (limited to 'libopie/ofileselector/configure') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | libopie/ofileselector/configure | 301 |
1 files changed, 0 insertions, 301 deletions
diff --git a/libopie/ofileselector/configure b/libopie/ofileselector/configure deleted file mode 100755 index c66fd82..0000000 --- a/libopie/ofileselector/configure +++ b/dev/null | |||
@@ -1,301 +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 | |||
8 | PLATFORM=generic | ||
9 | SHARING=shared | ||
10 | DEBUG= | ||
11 | QCONFIGARG= | ||
12 | |||
13 | touch .test.qpe. | ||
14 | if [ '!' -f ${OPIEDIR}/.test.qpe. ]; | ||
15 | then | ||
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 | ||
29 | fi | ||
30 | rm .test.qpe. | ||
31 | |||
32 | if [ '!' -f $TMAKEPATH/tmake.conf ] | ||
33 | then | ||
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 | ||
41 | fi | ||
42 | |||
43 | VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <library/version.h) | ||
44 | VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <library/version.h) | ||
45 | VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <library/version.h) | ||
46 | |||
47 | TOMAKE= | ||
48 | |||
49 | if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h | ||
50 | then | ||
51 | QT3=yes | ||
52 | else | ||
53 | QT3=no | ||
54 | fi | ||
55 | |||
56 | # Parse the arguments, setting things to "yes" or "no". | ||
57 | |||
58 | while [ -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 | ||
89 | done | ||
90 | |||
91 | TARGET=configs/$PLATFORM-$SHARING$DEBUG | ||
92 | |||
93 | if [ '!' -f $TARGET ] | ||
94 | then | ||
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 | ||
105 | fi | ||
106 | |||
107 | # Next, emit a usage message if something failed. | ||
108 | |||
109 | if [ "$HELP" = "yes" ]; then | ||
110 | cat <<EOF | ||
111 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] | ||
112 | |||
113 | The defaults (*) are usually acceptable. Here is a short explanation of | ||
114 | each 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) | ||
125 | EOF | ||
126 | exit 0; | ||
127 | fi | ||
128 | |||
129 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` | ||
130 | |||
131 | if [ -f library/custom-$CUSTOM.h ] | ||
132 | then | ||
133 | rm -f library/custom.h | ||
134 | ln -s custom-$CUSTOM.h library/custom.h | ||
135 | fi | ||
136 | |||
137 | mkdir -p include/qpe | ||
138 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) | ||
139 | mkdir -p include/qtopia | ||
140 | ( cd include/qtopia && rm -f *.h; ln -s ../../library/*.h .; ) | ||
141 | mkdir -p include/qtopia/private | ||
142 | ( cd include/qtopia/private && rm -f *.h; ln -s ../../../library/backend/*.h .; ) | ||
143 | mkdir -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 && ln -fs ../../libopie/ofileselector/*.h .; ) | ||
148 | |||
149 | echo Creating makefiles... | ||
150 | |||
151 | # Set version for library directly | ||
152 | # Version 1.5.0 right now for compat. | ||
153 | sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v | ||
154 | mv library/library.pro-v library/library.pro | ||
155 | |||
156 | if [ "$QT3" = yes ] | ||
157 | then | ||
158 | VCONFIG="CONFIG+=qt3" | ||
159 | else | ||
160 | VCONFIG="CONFIG+=qt2" | ||
161 | fi | ||
162 | |||
163 | if [ -f $TMAKEPATH/tmake.conf ] | ||
164 | then | ||
165 | # You have tmake. We'll regenerate the file for you... | ||
166 | echo "Makefiles will be regenerated." | ||
167 | fi | ||
168 | |||
169 | H=`pwd` | ||
170 | if [ -z "$TOMAKE" ] | ||
171 | then | ||
172 | TOMAKE=`make showcomponents` | ||
173 | fi | ||
174 | |||
175 | for a in $TOMAKE ; do | ||
176 | N=$a/Makefile | ||
177 | M=$a/Makefile.in | ||
178 | O=$a/Makefile.add | ||
179 | f=`basename $a` | ||
180 | |||
181 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] | ||
182 | then | ||
183 | ( cd $a; | ||
184 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ | ||
185 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ | ||
186 | -t $H/qt/tmake/propagate.t $f.pro | | ||
187 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; | ||
188 | ) | ||
189 | echo -n "." | ||
190 | #echo Building $N.. | ||
191 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` | ||
192 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` | ||
193 | if [ -n "$translation" -a -n "$appname" ] | ||
194 | then | ||
195 | if [ "$appname" != "$translation" ] | ||
196 | then | ||
197 | echo | ||
198 | echo "Warning: translation and appname disagree in $a/$f.pro" | ||
199 | fi | ||
200 | fi | ||
201 | |||
202 | fi | ||
203 | |||
204 | cat > $N <<EOF | ||
205 | ############################################################################# | ||
206 | # Automatically generated from $M | ||
207 | # Build options from $1 | ||
208 | ############################################################################# | ||
209 | |||
210 | EOF | ||
211 | |||
212 | SED= | ||
213 | PLATFORM_CFLAGS= | ||
214 | |||
215 | if [ "$f" = "embeddedkonsole" ] | ||
216 | then | ||
217 | case $PLATFORM in | ||
218 | *x86*|*generic*|*ipaq*|*sharp*) | ||
219 | SED="$SED /^LIBS.*=/s/\$/ -lutil/;" | ||
220 | PLATFORM_CFLAGS="-DHAVE_OPENPTY" | ||
221 | ;; *) | ||
222 | SED= | ||
223 | esac | ||
224 | elif [ "$f" = "libmpeg3" ] | ||
225 | then | ||
226 | # Patch our Makefile.in file with the platform specifics for the libmpeg3 library | ||
227 | # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) | ||
228 | SED='s/\$(CC)/\$(CXX)/;' | ||
229 | case $PLATFORM | ||
230 | in | ||
231 | # For x86 turn on using floating point, compile mmx and css code | ||
232 | *x86*) | ||
233 | # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" | ||
234 | PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" | ||
235 | SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" | ||
236 | # For generic turn on using floating point | ||
237 | ;; *generic*) | ||
238 | PLATFORM_CFLAGS="" | ||
239 | # For the ipaq use fixed point maths, don't compile the mmx or css code | ||
240 | ;; *ipaq*|*sharp*) | ||
241 | PLATFORM_CFLAGS="-DUSE_FIXED_POINT" | ||
242 | ;; *) | ||
243 | # For 'other platforms', turn off optimizations and use fixed point | ||
244 | PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT" | ||
245 | esac | ||
246 | elif [ "$f" = "libmad" ] | ||
247 | then | ||
248 | # Patch our Makefile.in file with the platform specifics for the libmad library | ||
249 | case $PLATFORM | ||
250 | in | ||
251 | # For x86 use intel optimizations | ||
252 | *x86*) | ||
253 | PLATFORM_CFLAGS="-DFPM_INTEL" | ||
254 | # For the ipaq use ARM asm optimizations | ||
255 | ;; *ipaq*|*sharp*) | ||
256 | PLATFORM_CFLAGS="-DFPM_ARM" | ||
257 | SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" | ||
258 | # For generic platforms use the C 64-bit implementation | ||
259 | ;; *generic*) | ||
260 | PLATFORM_CFLAGS="-DFPM_64BIT" | ||
261 | # For 'other platforms' use the ARM code | ||
262 | ;; *) | ||
263 | PLATFORM_CFLAGS="-DFPM_ARM" | ||
264 | SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" | ||
265 | esac | ||
266 | fi | ||
267 | if [ -n "$PLATFORM_CFLAGS" ] | ||
268 | then | ||
269 | # Append the addition c-flags we have defined | ||
270 | SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" | ||
271 | SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" | ||
272 | fi | ||
273 | cat $TARGET >> $N | ||
274 | if [ -n "$SED" ] | ||
275 | then | ||
276 | sed -e "$SED" $M >> $N | ||
277 | else | ||
278 | cat $M >> $N | ||
279 | fi | ||
280 | |||
281 | cat >> $N <<EOF | ||
282 | |||
283 | lupdate: | ||
284 | lupdate $f.pro | ||
285 | |||
286 | lrelease: | ||
287 | lrelease $f.pro | ||
288 | |||
289 | EOF | ||
290 | if [ -f "$O" ] | ||
291 | then | ||
292 | cat >> $N $O | ||
293 | fi | ||
294 | |||
295 | done | ||
296 | |||
297 | MAKE=make | ||
298 | echo | ||
299 | echo "Opie is now configured for building. Just run $MAKE (or $MAKE single)." | ||
300 | echo "To reconfigure, run $MAKE clean and configure." | ||
301 | echo | ||