|
diff --git a/configure b/configure index 8b0f37e..df8250e 100755 --- a/ configure+++ b/ configure |
|
@@ -46,192 +46,193 @@ VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' |
46 | |
46 | |
47 | TOMAKE= |
47 | TOMAKE= |
48 | |
48 | |
49 | if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h |
49 | 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 | |
139 | |
140 | mkdir -p include/opie |
140 | mkdir -p include/opie |
141 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) |
141 | ( cd include/opie && rm -f *.h; ln -s ../../libopie/*.h .; rm -f *_p.h; ) |
| |
142 | ( cd include/opie && ln -s ../../libsql/*.h . ) |
142 | |
143 | |
143 | echo Creating makefiles... |
144 | echo Creating makefiles... |
144 | |
145 | |
145 | # Set version for library directly |
146 | # Set version for library directly |
146 | # Version 1.5.0 right now for compat. |
147 | # Version 1.5.0 right now for compat. |
147 | sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
148 | sed -e 's/^\(VERSION.*= \).*/\1'1.5.0.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
148 | mv library/library.pro-v library/library.pro |
149 | mv library/library.pro-v library/library.pro |
149 | |
150 | |
150 | if [ "$QT3" = yes ] |
151 | if [ "$QT3" = yes ] |
151 | then |
152 | then |
152 | VCONFIG="CONFIG+=qt3" |
153 | VCONFIG="CONFIG+=qt3" |
153 | else |
154 | else |
154 | VCONFIG="CONFIG+=qt2" |
155 | VCONFIG="CONFIG+=qt2" |
155 | fi |
156 | fi |
156 | |
157 | |
157 | if [ -f $TMAKEPATH/tmake.conf ] |
158 | if [ -f $TMAKEPATH/tmake.conf ] |
158 | then |
159 | then |
159 | # You have tmake. We'll regenerate the file for you... |
160 | # You have tmake. We'll regenerate the file for you... |
160 | echo "Makefiles will be regenerated." |
161 | echo "Makefiles will be regenerated." |
161 | fi |
162 | fi |
162 | |
163 | |
163 | H=`pwd` |
164 | H=`pwd` |
164 | if [ -z "$TOMAKE" ] |
165 | if [ -z "$TOMAKE" ] |
165 | then |
166 | then |
166 | TOMAKE=`make showcomponents` |
167 | TOMAKE=`make showcomponents` |
167 | fi |
168 | fi |
168 | |
169 | |
169 | for a in $TOMAKE ; do |
170 | for a in $TOMAKE ; do |
170 | N=$a/Makefile |
171 | N=$a/Makefile |
171 | M=$a/Makefile.in |
172 | M=$a/Makefile.in |
172 | O=$a/Makefile.add |
173 | O=$a/Makefile.add |
173 | f=`basename $a` |
174 | f=`basename $a` |
174 | |
175 | |
175 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] |
176 | if [ -f "$TMAKEPATH/tmake.conf" -a -f "$a/$f.pro" ] |
176 | then |
177 | then |
177 | ( cd $a; |
178 | ( cd $a; |
178 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
179 | TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ |
179 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
180 | tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ |
180 | -t $H/qt/tmake/propagate.t $f.pro | |
181 | -t $H/qt/tmake/propagate.t $f.pro | |
181 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
182 | sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in; |
182 | ) |
183 | ) |
183 | echo -n "." |
184 | echo -n "." |
184 | #echo Building $N.. |
185 | #echo Building $N.. |
185 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` |
186 | appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | tr -d " \t"` |
186 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
187 | translation=`grep '^TRANSLATION.*[^+]=.*' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` |
187 | if [ -n "$translation" -a -n "$appname" ] |
188 | if [ -n "$translation" -a -n "$appname" ] |
188 | then |
189 | then |
189 | if [ "$appname" != "$translation" ] |
190 | if [ "$appname" != "$translation" ] |
190 | then |
191 | then |
191 | echo |
192 | echo |
192 | echo "Warning: translation and appname disagree in $a/$f.pro" |
193 | echo "Warning: translation and appname disagree in $a/$f.pro" |
193 | fi |
194 | fi |
194 | fi |
195 | fi |
195 | |
196 | |
196 | fi |
197 | fi |
197 | |
198 | |
198 | cat > $N <<EOF |
199 | cat > $N <<EOF |
199 | ############################################################################# |
200 | ############################################################################# |
200 | # Automatically generated from $M |
201 | # Automatically generated from $M |
201 | # Build options from $1 |
202 | # Build options from $1 |
202 | ############################################################################# |
203 | ############################################################################# |
203 | |
204 | |
204 | EOF |
205 | EOF |
205 | |
206 | |
206 | SED= |
207 | SED= |
207 | PLATFORM_CFLAGS= |
208 | PLATFORM_CFLAGS= |
208 | |
209 | |
209 | if [ "$f" = "embeddedkonsole" ] |
210 | if [ "$f" = "embeddedkonsole" ] |
210 | then |
211 | then |
211 | case $PLATFORM in |
212 | case $PLATFORM in |
212 | *x86*|*generic*|*ipaq*|*sharp*) |
213 | *x86*|*generic*|*ipaq*|*sharp*) |
213 | SED="$SED /^LIBS.*=/s/\$/ -lutil/;" |
214 | SED="$SED /^LIBS.*=/s/\$/ -lutil/;" |
214 | PLATFORM_CFLAGS="-DHAVE_OPENPTY" |
215 | PLATFORM_CFLAGS="-DHAVE_OPENPTY" |
215 | ;; *) |
216 | ;; *) |
216 | SED= |
217 | SED= |
217 | esac |
218 | esac |
218 | elif [ "$f" = "libmpeg3" ] |
219 | elif [ "$f" = "libmpeg3" ] |
219 | then |
220 | then |
220 | # Patch our Makefile.in file with the platform specifics for the libmpeg3 library |
221 | # Patch our Makefile.in file with the platform specifics for the libmpeg3 library |
221 | # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) |
222 | # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) |
222 | SED='s/\$(CC)/\$(CXX)/;' |
223 | SED='s/\$(CC)/\$(CXX)/;' |
223 | case $PLATFORM |
224 | case $PLATFORM |
224 | in |
225 | in |
225 | # For x86 turn on using floating point, compile mmx and css code |
226 | # For x86 turn on using floating point, compile mmx and css code |
226 | *x86*) |
227 | *x86*) |
227 | # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" |
228 | # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" |
228 | PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" |
229 | PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" |
229 | SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" |
230 | SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" |
230 | # For generic turn on using floating point |
231 | # For generic turn on using floating point |
231 | ;; *generic*) |
232 | ;; *generic*) |
232 | PLATFORM_CFLAGS="" |
233 | PLATFORM_CFLAGS="" |
233 | # For the ipaq use fixed point maths, don't compile the mmx or css code |
234 | # For the ipaq use fixed point maths, don't compile the mmx or css code |
234 | ;; *ipaq*|*sharp*) |
235 | ;; *ipaq*|*sharp*) |
235 | PLATFORM_CFLAGS="-DUSE_FIXED_POINT" |
236 | PLATFORM_CFLAGS="-DUSE_FIXED_POINT" |
236 | ;; *) |
237 | ;; *) |
237 | # For 'other platforms', turn off optimizations and use fixed point |
238 | # For 'other platforms', turn off optimizations and use fixed point |
|