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