|
diff --git a/configure b/configure index b6800dc..7949bf4 100755 --- a/ configure+++ b/ configure |
|
@@ -50,192 +50,193 @@ if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h |
50 | then |
50 | then |
51 | QT3=yes |
51 | QT3=yes |
52 | else |
52 | else |
53 | QT3=no |
53 | QT3=no |
54 | fi |
54 | fi |
55 | |
55 | |
56 | # Parse the arguments, setting things to "yes" or "no". |
56 | # Parse the arguments, setting things to "yes" or "no". |
57 | |
57 | |
58 | while [ -n "$1" ]; do |
58 | while [ -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 |
89 | done |
89 | done |
90 | |
90 | |
91 | TARGET=configs/$PLATFORM-$SHARING$DEBUG |
91 | TARGET=configs/$PLATFORM-$SHARING$DEBUG |
92 | |
92 | |
93 | if [ '!' -f $TARGET ] |
93 | if [ '!' -f $TARGET ] |
94 | then |
94 | then |
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 |
105 | fi |
105 | fi |
106 | |
106 | |
107 | # Next, emit a usage message if something failed. |
107 | # Next, emit a usage message if something failed. |
108 | |
108 | |
109 | if [ "$HELP" = "yes" ]; then |
109 | if [ "$HELP" = "yes" ]; then |
110 | cat <<EOF |
110 | cat <<EOF |
111 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] |
111 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] |
112 | |
112 | |
113 | The defaults (*) are usually acceptable. Here is a short explanation of |
113 | The defaults (*) are usually acceptable. Here is a short explanation of |
114 | each option: |
114 | 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) |
125 | EOF |
125 | EOF |
126 | exit 0; |
126 | exit 0; |
127 | fi |
127 | fi |
128 | |
128 | |
129 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` |
129 | CUSTOM=`echo $PLATFORM | sed -n -e "s/.*-\(.*\)-.*/\1/p"` |
130 | |
130 | |
131 | if [ -f library/custom-$CUSTOM.h ] |
131 | if [ -f library/custom-$CUSTOM.h ] |
132 | then |
132 | then |
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 |
135 | fi |
135 | fi |
136 | |
136 | |
137 | mkdir -p include/qpe |
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; ) |
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 |
139 | mkdir -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 .; ) |
141 | mkdir -p include/qtopia/private |
141 | mkdir -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 .; ) |
143 | mkdir -p include/opie |
143 | mkdir -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 | |
147 | |
147 | echo Creating makefiles... |
148 | echo Creating makefiles... |
148 | |
149 | |
149 | # Set version for library directly |
150 | # Set version for library directly |
150 | # Version 1.5.0 right now for compat. |
151 | # Version 1.5.0 right now for compat. |
151 | sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
152 | sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
152 | mv library/library.pro-v library/library.pro |
153 | mv library/library.pro-v library/library.pro |
153 | |
154 | |
154 | if [ "$QT3" = yes ] |
155 | if [ "$QT3" = yes ] |
155 | then |
156 | then |
156 | VCONFIG="CONFIG+=qt3" |
157 | VCONFIG="CONFIG+=qt3" |
157 | else |
158 | else |
158 | VCONFIG="CONFIG+=qt2" |
159 | VCONFIG="CONFIG+=qt2" |
159 | fi |
160 | fi |
160 | |
161 | |
161 | if [ -f $TMAKEPATH/tmake.conf ] |
162 | if [ -f $TMAKEPATH/tmake.conf ] |
162 | then |
163 | then |
163 | # You have tmake. We'll regenerate the file for you... |
164 | # You have tmake. We'll regenerate the file for you... |
164 | echo "Makefiles will be regenerated." |
165 | echo "Makefiles will be regenerated." |
165 | fi |
166 | fi |
166 | |
167 | |
167 | H=`pwd` |
168 | H=`pwd` |
168 | if [ -z "$TOMAKE" ] |
169 | if [ -z "$TOMAKE" ] |
169 | then |
170 | then |
170 | TOMAKE=`make showcomponents` |
171 | TOMAKE=`make showcomponents` |
171 | fi |
172 | fi |
172 | |
173 | |
173 | for a in $TOMAKE ; do |
174 | for a in $TOMAKE ; do |
174 | N=$a/Makefile |
175 | N=$a/Makefile |
175 | M=$a/Makefile.in |
176 | M=$a/Makefile.in |
176 | O=$a/Makefile.add |
177 | O=$a/Makefile.add |
177 | f=`basename $a` |
178 | f=`basename $a` |
178 | |
179 | |
179 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] |
180 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] |
180 | then |
181 | then |
181 | ( cd $a; |
182 | ( cd $a; |
182 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
183 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
183 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
184 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
184 | -t $H/qt/tmake/propagate.t $f.pro | |
185 | -t $H/qt/tmake/propagate.t $f.pro | |
185 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
186 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
186 | ) |
187 | ) |
187 | echo -n "." |
188 | echo -n "." |
188 | #echo Building $N.. |
189 | #echo Building $N.. |
189 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` |
190 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` |
190 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
191 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
191 | if [ -n "$translation" -a -n "$appname" ] |
192 | if [ -n "$translation" -a -n "$appname" ] |
192 | then |
193 | then |
193 | if [ "$appname" != "$translation" ] |
194 | if [ "$appname" != "$translation" ] |
194 | then |
195 | then |
195 | echo |
196 | echo |
196 | echo "Warning: translation and appname disagree in $a/$f.pro" |
197 | echo "Warning: translation and appname disagree in $a/$f.pro" |
197 | fi |
198 | fi |
198 | fi |
199 | fi |
199 | |
200 | |
200 | fi |
201 | fi |
201 | |
202 | |
202 | cat > $N <<EOF |
203 | cat > $N <<EOF |
203 | ############################################################################# |
204 | ############################################################################# |
204 | # Automatically generated from $M |
205 | # Automatically generated from $M |
205 | # Build options from $1 |
206 | # Build options from $1 |
206 | ############################################################################# |
207 | ############################################################################# |
207 | |
208 | |
208 | EOF |
209 | EOF |
209 | |
210 | |
210 | SED= |
211 | SED= |
211 | PLATFORM_CFLAGS= |
212 | PLATFORM_CFLAGS= |
212 | |
213 | |
213 | if [ "$f" = "embeddedkonsole" ] |
214 | if [ "$f" = "embeddedkonsole" ] |
214 | then |
215 | then |
215 | case $PLATFORM in |
216 | case $PLATFORM in |
216 | *x86*|*generic*|*ipaq*|*sharp*) |
217 | *x86*|*generic*|*ipaq*|*sharp*) |
217 | SED="$SED /^LIBS.*=/s/\$/ -lutil/;" |
218 | SED="$SED /^LIBS.*=/s/\$/ -lutil/;" |
218 | PLATFORM_CFLAGS="-DHAVE_OPENPTY" |
219 | PLATFORM_CFLAGS="-DHAVE_OPENPTY" |
219 | ;; *) |
220 | ;; *) |
220 | SED= |
221 | SED= |
221 | esac |
222 | esac |
222 | elif [ "$f" = "libmpeg3" ] |
223 | elif [ "$f" = "libmpeg3" ] |
223 | then |
224 | then |
224 | # Patch our Makefile.in file with the platform specifics for the libmpeg3 library |
225 | # Patch our Makefile.in file with the platform specifics for the libmpeg3 library |
225 | # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) |
226 | # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) |
226 | SED='s/\$(CC)/\$(CXX)/;' |
227 | SED='s/\$(CC)/\$(CXX)/;' |
227 | case $PLATFORM |
228 | case $PLATFORM |
228 | in |
229 | in |
229 | # For x86 turn on using floating point, compile mmx and css code |
230 | # For x86 turn on using floating point, compile mmx and css code |
230 | *x86*) |
231 | *x86*) |
231 | # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" |
232 | # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" |
232 | PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" |
233 | PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" |
233 | SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" |
234 | SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" |
234 | # For generic turn on using floating point |
235 | # For generic turn on using floating point |
235 | ;; *generic*) |
236 | ;; *generic*) |
236 | PLATFORM_CFLAGS="" |
237 | PLATFORM_CFLAGS="" |
237 | # For the ipaq use fixed point maths, don't compile the mmx or css code |
238 | # For the ipaq use fixed point maths, don't compile the mmx or css code |
238 | ;; *ipaq*|*sharp*) |
239 | ;; *ipaq*|*sharp*) |
239 | PLATFORM_CFLAGS="-DUSE_FIXED_POINT" |
240 | PLATFORM_CFLAGS="-DUSE_FIXED_POINT" |
240 | ;; *) |
241 | ;; *) |
241 | # For 'other platforms', turn off optimizations and use fixed point |
242 | # For 'other platforms', turn off optimizations and use fixed point |
|