summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-03-28 15:48:51 (UTC)
committer kergoth <kergoth>2002-03-28 15:48:51 (UTC)
commitf2da8068e337e426766144ae22fc2c973ca30548 (patch) (unidiff)
tree8a35d1b5492a1ac8c2cffe0d526d2199777ec31e
parent24464bb5e5ffa11961bf1946529d7ebc225b990c (diff)
downloadopie-f2da8068e337e426766144ae22fc2c973ca30548.zip
opie-f2da8068e337e426766144ae22fc2c973ca30548.tar.gz
opie-f2da8068e337e426766144ae22fc2c973ca30548.tar.bz2
added commented debug echo to configure.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xconfigure1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure b/configure
index 7db2738..9de0276 100755
--- a/configure
+++ b/configure
@@ -1,290 +1,291 @@
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 else 98 else
99 echo 99 echo
100 echo ' The specified platform/compiler not supported: ' $TARGET 100 echo ' The specified platform/compiler not supported: ' $TARGET
101 echo 101 echo
102 exit 2 102 exit 2
103 fi 103 fi
104fi 104fi
105 105
106# Next, emit a usage message if something failed. 106# Next, emit a usage message if something failed.
107 107
108if [ "$HELP" = "yes" ]; then 108if [ "$HELP" = "yes" ]; then
109 cat <<EOF 109 cat <<EOF
110Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] 110Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...]
111 111
112The defaults (*) are usually acceptable. Here is a short explanation of 112The defaults (*) are usually acceptable. Here is a short explanation of
113each option: 113each option:
114 114
115 * -release ........... Compile and link Qt with debugging turned off. 115 * -release ........... Compile and link Qt with debugging turned off.
116 -debug ............. Compile and link Qt with debugging turned on. 116 -debug ............. Compile and link Qt with debugging turned on.
117 117
118 * -shared ............ Create and use a shared Qt library (libqt.so) 118 * -shared ............ Create and use a shared Qt library (libqt.so)
119 -static ............ Create and use a static Qt library (libqt.a) 119 -static ............ Create and use a static Qt library (libqt.a)
120 120
121 -qt3 ............... Configure for use with Qt 3.x 121 -qt3 ............... Configure for use with Qt 3.x
122 122
123 -platform target ... The platform you are building on ($PLATFORM) 123 -platform target ... The platform you are building on ($PLATFORM)
124EOF 124EOF
125 exit 0; 125 exit 0;
126fi 126fi
127 127
128if [ -f library/custom-$PLATFORM.h ] 128if [ -f library/custom-$PLATFORM.h ]
129then 129then
130 rm -f library/custom.h 130 rm -f library/custom.h
131 ln -s custom-$PLATFORM.h library/custom.h 131 ln -s custom-$PLATFORM.h library/custom.h
132fi 132fi
133 133
134mkdir -p include/qpe 134mkdir -p include/qpe
135( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) 135( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; )
136 136
137mkdir -p include/opie 137mkdir -p include/opie
138( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) 138( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; )
139 139
140 140
141echo Creating makefiles... 141echo Creating makefiles...
142 142
143sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v 143sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v
144mv library/library.pro-v library/library.pro 144mv library/library.pro-v library/library.pro
145 145
146if [ "$QT3" = yes ] 146if [ "$QT3" = yes ]
147then 147then
148 VCONFIG="CONFIG+=qt3" 148 VCONFIG="CONFIG+=qt3"
149else 149else
150 VCONFIG="CONFIG+=qt2" 150 VCONFIG="CONFIG+=qt2"
151fi 151fi
152 152
153if [ -f $TMAKEPATH/tmake.conf ] 153if [ -f $TMAKEPATH/tmake.conf ]
154then 154then
155 # You have tmake. We'll regenerate the file for you... 155 # You have tmake. We'll regenerate the file for you...
156 echo "Makefiles will be regenerated." 156 echo "Makefiles will be regenerated."
157fi 157fi
158 158
159H=`pwd` 159H=`pwd`
160if [ -z "$TOMAKE" ] 160if [ -z "$TOMAKE" ]
161then 161then
162 TOMAKE=`make showcomponents` 162 TOMAKE=`make showcomponents`
163fi 163fi
164 164
165for a in $TOMAKE ; do 165for a in $TOMAKE ; do
166 N=$a/Makefile 166 N=$a/Makefile
167 M=$a/Makefile.in 167 M=$a/Makefile.in
168 O=$a/Makefile.add 168 O=$a/Makefile.add
169 f=`basename $a` 169 f=`basename $a`
170 170
171 if [ -f $TMAKEPATH/tmake.conf -a -f $a/$f.pro ] 171 if [ -f $TMAKEPATH/tmake.conf -a -f $a/$f.pro ]
172 then 172 then
173 ( cd $a; 173 ( cd $a;
174 TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ 174 TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \
175 tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ 175 tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \
176 -t $H/qt/tmake/propagate.t $f.pro | 176 -t $H/qt/tmake/propagate.t $f.pro |
177 sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; 177 sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in;
178 ) 178 )
179 echo -n "." 179 echo -n "."
180 #echo Building $N..
180 appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'` 181 appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'`
181 translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` 182 translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' `
182 if [ -n "$translation" -a -n "$appname" ] 183 if [ -n "$translation" -a -n "$appname" ]
183 then 184 then
184 if [ $appname != $translation ] 185 if [ $appname != $translation ]
185 then 186 then
186 echo 187 echo
187 echo "Warning: translation and appname disagree in $a/$f.pro" 188 echo "Warning: translation and appname disagree in $a/$f.pro"
188 fi 189 fi
189 fi 190 fi
190 191
191 fi 192 fi
192 193
193 cat > $N <<EOF 194 cat > $N <<EOF
194############################################################################# 195#############################################################################
195# Automatically generated from $M 196# Automatically generated from $M
196# Build options from $1 197# Build options from $1
197############################################################################# 198#############################################################################
198 199
199EOF 200EOF
200 201
201 SED= 202 SED=
202 PLATFORM_CFLAGS= 203 PLATFORM_CFLAGS=
203 204
204 if [ "$f" = "embeddedkonsole" ] 205 if [ "$f" = "embeddedkonsole" ]
205 then 206 then
206 case $PLATFORM in 207 case $PLATFORM in
207 *x86*|*generic*|*ipaq*) 208 *x86*|*generic*|*ipaq*)
208 SED="$SED /^LIBS.*=/s/\$/ -lutil/;" 209 SED="$SED /^LIBS.*=/s/\$/ -lutil/;"
209 PLATFORM_CFLAGS="-DHAVE_OPENPTY" 210 PLATFORM_CFLAGS="-DHAVE_OPENPTY"
210 ;; *) 211 ;; *)
211 SED= 212 SED=
212 esac 213 esac
213 elif [ "$f" = "libmpeg3" ] 214 elif [ "$f" = "libmpeg3" ]
214 then 215 then
215 # Patch our Makefile.in file with the platform specifics for the libmpeg3 library 216 # Patch our Makefile.in file with the platform specifics for the libmpeg3 library
216 # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) 217 # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code)
217 SED='s/\$(CC)/\$(CXX)/;' 218 SED='s/\$(CC)/\$(CXX)/;'
218 case $PLATFORM 219 case $PLATFORM
219 in 220 in
220 # For x86 turn on using floating point, compile mmx and css code 221 # For x86 turn on using floating point, compile mmx and css code
221 *x86*) 222 *x86*)
222 # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" 223 # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486"
223 PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" 224 PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS"
224 SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" 225 SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;"
225 # For generic turn on using floating point 226 # For generic turn on using floating point
226 ;; *generic*) 227 ;; *generic*)
227 PLATFORM_CFLAGS="" 228 PLATFORM_CFLAGS=""
228 # For the ipaq use fixed point maths, don't compile the mmx or css code 229 # For the ipaq use fixed point maths, don't compile the mmx or css code
229 ;; *ipaq*) 230 ;; *ipaq*)
230 PLATFORM_CFLAGS="-DUSE_FIXED_POINT" 231 PLATFORM_CFLAGS="-DUSE_FIXED_POINT"
231 ;; *) 232 ;; *)
232 # For 'other platforms', turn off optimizations and use fixed point 233 # For 'other platforms', turn off optimizations and use fixed point
233 PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT" 234 PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT"
234 esac 235 esac
235 elif [ "$f" = "libmad" ] 236 elif [ "$f" = "libmad" ]
236 then 237 then
237 # Patch our Makefile.in file with the platform specifics for the libmad library 238 # Patch our Makefile.in file with the platform specifics for the libmad library
238 case $PLATFORM 239 case $PLATFORM
239 in 240 in
240 # For x86 use intel optimizations 241 # For x86 use intel optimizations
241 *x86*) 242 *x86*)
242 PLATFORM_CFLAGS="-DFPM_INTEL" 243 PLATFORM_CFLAGS="-DFPM_INTEL"
243 # For the ipaq use ARM asm optimizations 244 # For the ipaq use ARM asm optimizations
244 ;; *ipaq*) 245 ;; *ipaq*)
245 PLATFORM_CFLAGS="-DFPM_ARM" 246 PLATFORM_CFLAGS="-DFPM_ARM"
246 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" 247 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;"
247 # For generic platforms use the C 64-bit implementation 248 # For generic platforms use the C 64-bit implementation
248 ;; *generic*) 249 ;; *generic*)
249 PLATFORM_CFLAGS="-DFPM_64BIT" 250 PLATFORM_CFLAGS="-DFPM_64BIT"
250 # For 'other platforms' use the ARM code 251 # For 'other platforms' use the ARM code
251 ;; *) 252 ;; *)
252 PLATFORM_CFLAGS="-DFPM_ARM" 253 PLATFORM_CFLAGS="-DFPM_ARM"
253 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" 254 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;"
254 esac 255 esac
255 fi 256 fi
256 if [ -n "$PLATFORM_CFLAGS" ] 257 if [ -n "$PLATFORM_CFLAGS" ]
257 then 258 then
258 # Append the addition c-flags we have defined 259 # Append the addition c-flags we have defined
259 SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" 260 SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;"
260 SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" 261 SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;"
261 fi 262 fi
262 cat $TARGET >> $N 263 cat $TARGET >> $N
263 if [ -n "$SED" ] 264 if [ -n "$SED" ]
264 then 265 then
265 sed -e "$SED" $M >> $N 266 sed -e "$SED" $M >> $N
266 else 267 else
267 cat $M >> $N 268 cat $M >> $N
268 fi 269 fi
269 270
270 cat >> $N <<EOF 271 cat >> $N <<EOF
271 272
272lupdate: 273lupdate:
273 lupdate $f.pro 274 lupdate $f.pro
274 275
275lrelease: 276lrelease:
276 lrelease $f.pro 277 lrelease $f.pro
277 278
278EOF 279EOF
279 if [ -f "$O" ] 280 if [ -f "$O" ]
280 then 281 then
281 cat >> $N $O 282 cat >> $N $O
282 fi 283 fi
283 284
284done 285done
285 286
286MAKE=make 287MAKE=make
287echo 288echo
288echo "QPE is now configured for building. Just run $MAKE (or $MAKE single)." 289echo "QPE is now configured for building. Just run $MAKE (or $MAKE single)."
289echo "To reconfigure, run $MAKE clean and configure." 290echo "To reconfigure, run $MAKE clean and configure."
290echo 291echo