summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-11-01 22:18:04 (UTC)
committer kergoth <kergoth>2002-11-01 22:18:04 (UTC)
commitefbd14a8c566c7ed1c87068543ad7867519eeea1 (patch) (unidiff)
treec9335aa5739d44fa612fef0298f4e6e3a25c6130
parent438b8c09d5d18756f19bfa6043ad480a70e9267c (diff)
downloadopie-efbd14a8c566c7ed1c87068543ad7867519eeea1.zip
opie-efbd14a8c566c7ed1c87068543ad7867519eeea1.tar.gz
opie-efbd14a8c566c7ed1c87068543ad7867519eeea1.tar.bz2
Applied tronical's patch to correct linking on generated headers in libopie.
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xconfigure12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure b/configure
index 7949bf4..a990539 100755
--- a/configure
+++ b/configure
@@ -115,64 +115,66 @@ each 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; )
139mkdir -p include/qtopia 139mkdir -p include/qtopia
140( cd include/qtopia && rm -f *.h; ln -s ../../library/*.h .; ) 140( cd include/qtopia && rm -f *.h; ln -s ../../library/*.h .; )
141mkdir -p include/qtopia/private 141mkdir -p include/qtopia/private
142( cd include/qtopia/private && rm -f *.h; ln -s ../../../library/backend/*.h .; ) 142( cd include/qtopia/private && rm -f *.h; ln -s ../../../library/backend/*.h .; )
143mkdir -p include/opie 143mkdir -p include/opie
144( 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; )
145( cd include/opie && ln -s ../../libsql/*.h .; ) 145( cd include/opie && ln -s ../../libsql/*.h .; )
146( cd include/opie && ln -s ../../libopie/pim/*.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 -s ../../libopie/$generatedHeader $generatedHeader; done )
147 149
148echo Creating makefiles... 150echo Creating makefiles...
149 151
150# Set version for library directly 152# Set version for library directly
151# Version 1.5.0 right now for compat. 153# Version 1.5.0 right now for compat.
152sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v 154sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v
153mv library/library.pro-v library/library.pro 155mv library/library.pro-v library/library.pro
154 156
155if [ "$QT3" = yes ] 157if [ "$QT3" = yes ]
156then 158then
157 VCONFIG="CONFIG+=qt3" 159 VCONFIG="CONFIG+=qt3"
158else 160else
159 VCONFIG="CONFIG+=qt2" 161 VCONFIG="CONFIG+=qt2"
160fi 162fi
161 163
162if [ -f $TMAKEPATH/tmake.conf ] 164if [ -f $TMAKEPATH/tmake.conf ]
163then 165then
164 # You have tmake. We'll regenerate the file for you... 166 # You have tmake. We'll regenerate the file for you...
165 echo "Makefiles will be regenerated." 167 echo "Makefiles will be regenerated."
166fi 168fi
167 169
168H=`pwd` 170H=`pwd`
169if [ -z "$TOMAKE" ] 171if [ -z "$TOMAKE" ]
170then 172then
171 TOMAKE=`make showcomponents` 173 TOMAKE=`make showcomponents`
172fi 174fi
173 175
174for a in $TOMAKE ; do 176for a in $TOMAKE ; do
175 N=$a/Makefile 177 N=$a/Makefile
176 M=$a/Makefile.in 178 M=$a/Makefile.in
177 O=$a/Makefile.add 179 O=$a/Makefile.add
178 f=`basename $a` 180 f=`basename $a`
@@ -185,116 +187,118 @@ for a in $TOMAKE ; do
185 -t $H/qt/tmake/propagate.t $f.pro | 187 -t $H/qt/tmake/propagate.t $f.pro |
186 sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; 188 sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in;
187 ) 189 )
188 echo -n "." 190 echo -n "."
189 #echo Building $N.. 191 #echo Building $N..
190 appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` 192 appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"`
191 translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` 193 translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' `
192 if [ -n "$translation" -a -n "$appname" ] 194 if [ -n "$translation" -a -n "$appname" ]
193 then 195 then
194 if [ "$appname" != "$translation" ] 196 if [ "$appname" != "$translation" ]
195 then 197 then
196 echo 198 echo
197 echo "Warning: translation and appname disagree in $a/$f.pro" 199 echo "Warning: translation and appname disagree in $a/$f.pro"
198 fi 200 fi
199 fi 201 fi
200 202
201 fi 203 fi
202 204
203 cat > $N <<EOF 205 cat > $N <<EOF
204############################################################################# 206#############################################################################
205# Automatically generated from $M 207# Automatically generated from $M
206# Build options from $1 208# Build options from $1
207############################################################################# 209#############################################################################
208 210
209EOF 211EOF
210 212
211 SED= 213 SED=
212 PLATFORM_CFLAGS= 214 PLATFORM_CFLAGS=
213 215
214 if [ "$f" = "embeddedkonsole" ] 216 if [ "$f" = "embeddedkonsole" ]
215 then 217 then
216 case $PLATFORM in 218 case $PLATFORM in
217 *x86*|*generic*|*ipaq*|*sharp*) 219 *x86*|*generic*|*ipaq*|*oz*|*sharp*)
218 SED="$SED /^LIBS.*=/s/\$/ -lutil/;" 220 SED="$SED /^LIBS.*=/s/\$/ -lutil/;"
219 PLATFORM_CFLAGS="-DHAVE_OPENPTY" 221 PLATFORM_CFLAGS="-DHAVE_OPENPTY"
220 ;; *) 222 ;; *)
221 SED= 223 SED=
222 esac 224 esac
223 elif [ "$f" = "libmpeg3" ] 225 elif [ "$f" = "libmpeg3" ]
224 then 226 then
225 # Patch our Makefile.in file with the platform specifics for the libmpeg3 library 227 # Patch our Makefile.in file with the platform specifics for the libmpeg3 library
226 # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) 228 # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code)
227 SED='s/\$(CC)/\$(CXX)/;' 229 SED='s/\$(CC)/\$(CXX)/;'
228 case $PLATFORM 230 case $PLATFORM
229 in 231 in
230 # For x86 turn on using floating point, compile mmx and css code 232 # For x86 turn on using floating point, compile mmx and css code
231 *x86*) 233 *x86*)
232 # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" 234 # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486"
233 PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" 235 PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS"
234 SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" 236 SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;"
235 # For generic turn on using floating point 237 # For generic turn on using floating point
236 ;; *generic*) 238 ;; *generic*)
237 PLATFORM_CFLAGS="" 239 PLATFORM_CFLAGS=""
238 # For the ipaq use fixed point maths, don't compile the mmx or css code 240 # For the ipaq use fixed point maths, don't compile the mmx or css code
239 ;; *ipaq*|*sharp*) 241 ;; *ipaq*|*oz*|*sharp*)
240 PLATFORM_CFLAGS="-DUSE_FIXED_POINT" 242 PLATFORM_CFLAGS="-DUSE_FIXED_POINT"
241 ;; *) 243 ;; *)
242 # For 'other platforms', turn off optimizations and use fixed point 244 # For 'other platforms', turn off optimizations and use fixed point
243 PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT" 245 PLATFORM_CFLAGS="-O -DUSE_FIXED_POINT"
244 esac 246 esac
245 elif [ "$f" = "libmad" ] 247 elif [ "$f" = "libmad" ]
246 then 248 then
247 # Patch our Makefile.in file with the platform specifics for the libmad library 249 # Patch our Makefile.in file with the platform specifics for the libmad library
248 case $PLATFORM 250 case $PLATFORM
249 in 251 in
250 # For x86 use intel optimizations 252 # For x86 use intel optimizations
251 *x86*) 253 *x86*)
252 PLATFORM_CFLAGS="-DFPM_INTEL" 254 PLATFORM_CFLAGS="-DFPM_INTEL"
253 # For the ipaq use ARM asm optimizations 255 # For the ipaq use ARM asm optimizations
254 ;; *ipaq*|*sharp*) 256 ;; *ipaq*|*oz*|*sharp*)
255 PLATFORM_CFLAGS="-DFPM_ARM" 257 PLATFORM_CFLAGS="-DFPM_ARM"
256 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" 258 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;"
257 # For generic platforms use the C 64-bit implementation 259 # For generic platforms use the C 64-bit implementation
258 ;; *generic*) 260 ;; *generic*)
259 PLATFORM_CFLAGS="-DFPM_64BIT" 261 PLATFORM_CFLAGS="-DFPM_64BIT"
260 # For 'other platforms' use the ARM code 262 # For 'other platforms' use the ARM code
261 ;; *) 263 ;; *)
262 PLATFORM_CFLAGS="-DFPM_ARM" 264 PLATFORM_CFLAGS="-DFPM_ARM"
263 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;" 265 SED="$SED /SOURCES.*=/s/=/= idmt_arm.S /;"
264 esac 266 esac
265 fi 267 fi
268 SED="$SED /LFLAGS.*=.*/s/\$/ $EXTRA $EXTRALIBS/;"
269 PLATFORM_CFLAGS="$PLATFORM_CFLAGS $EXTRAFLAGS";
266 if [ -n "$PLATFORM_CFLAGS" ] 270 if [ -n "$PLATFORM_CFLAGS" ]
267 then 271 then
268 # Append the addition c-flags we have defined 272 # Append the addition c-flags we have defined
269 SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" 273 SED="$SED /CFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;"
270 SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS/;" 274 SED="$SED /CXXFLAGS.*=.*/s/\$/ $PLATFORM_CFLAGS -fpermissive/;"
271 fi 275 fi
272 cat $TARGET >> $N 276 cat $TARGET >> $N
273 if [ -n "$SED" ] 277 if [ -n "$SED" ]
274 then 278 then
275 sed -e "$SED" $M >> $N 279 sed -e "$SED" $M >> $N
276 else 280 else
277 cat $M >> $N 281 cat $M >> $N
278 fi 282 fi
279 283
280 cat >> $N <<EOF 284 cat >> $N <<EOF
281 285
282lupdate: 286lupdate:
283 lupdate $f.pro 287 lupdate $f.pro
284 288
285lrelease: 289lrelease:
286 lrelease $f.pro 290 lrelease $f.pro
287 291
288EOF 292EOF
289 if [ -f "$O" ] 293 if [ -f "$O" ]
290 then 294 then
291 cat >> $N $O 295 cat >> $N $O
292 fi 296 fi
293 297
294done 298done
295 299
296MAKE=make 300MAKE=make
297echo 301echo
298echo "Opie is now configured for building. Just run $MAKE (or $MAKE single)." 302echo "Opie is now configured for building. Just run $MAKE (or $MAKE single)."
299echo "To reconfigure, run $MAKE clean and configure." 303echo "To reconfigure, run $MAKE clean and configure."
300echo 304echo