summaryrefslogtreecommitdiff
path: root/configure
Unidiff
Diffstat (limited to 'configure') (more/less context) (ignore whitespace changes)
-rwxr-xr-xconfigure12
1 files changed, 6 insertions, 6 deletions
diff --git a/configure b/configure
index d36fd44..7824e36 100755
--- a/configure
+++ b/configure
@@ -1,72 +1,72 @@
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=linux-generic-g++ 8PLATFORM=linux-generic-g++
9SHARING=shared 9SHARING=shared
10DEBUG= 10DEBUG=
11QCONFIGARG= 11QCONFIGARG=
12 12
13touch .test.qpe. 13touch .test.qpe.
14if [ '!' -f ${QPEDIR}/.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 $QPEDIR is not set correctly. It is currently' 19 echo ' The environment variable $OPIEDIR is not set correctly. It is currently'
20 echo ' set to "'$QPEDIR'", 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 $QPEDIR' 23 echo ' Please read the INSTALL file for instructions on how to set $OPIEDIR'
24 echo ' correctly. If you have set $QPEDIR 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
32mkdir -p include/qpe 32mkdir -p include/qpe
33( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) 33( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; )
34 34
35VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <include/qpe/version.h) 35VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <include/qpe/version.h)
36VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <include/qpe/version.h) 36VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <include/qpe/version.h)
37VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <include/qpe/version.h) 37VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <include/qpe/version.h)
38 38
39TOMAKE= 39TOMAKE=
40 40
41if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h 41if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h
42then 42then
43 QT3=yes 43 QT3=yes
44else 44else
45 QT3=no 45 QT3=no
46fi 46fi
47 47
48# Parse the arguments, setting things to "yes" or "no". 48# Parse the arguments, setting things to "yes" or "no".
49 49
50while [ -n "$1" ]; do 50while [ -n "$1" ]; do
51 case $1 in 51 case $1 in
52 -platform|-xplatform) # No difference since we don't need to build moc, etc. 52 -platform|-xplatform) # No difference since we don't need to build moc, etc.
53 shift; PLATFORM=$1 53 shift; PLATFORM=$1
54 ;; 54 ;;
55 -release) 55 -release)
56 DEBUG= 56 DEBUG=
57 ;; 57 ;;
58 -debug) 58 -debug)
59 DEBUG=-debug 59 DEBUG=-debug
60 ;; 60 ;;
61 -shared) 61 -shared)
62 SHARING=shared 62 SHARING=shared
63 ;; 63 ;;
64 -static) 64 -static)
65 SHARING=static 65 SHARING=static
66 ;; 66 ;;
67 -qconfig) 67 -qconfig)
68 # optional way to specify the qconfig-qpe.h is to pass -qconfig qpe 68 # optional way to specify the qconfig-qpe.h is to pass -qconfig qpe
69 shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that. 69 shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that.
70 ;; 70 ;;
71 -make) 71 -make)
72 shift; TOMAKE="$TOMAKE $1" 72 shift; TOMAKE="$TOMAKE $1"
@@ -109,97 +109,97 @@ each option:
109 109
110 * -shared ............ Create and use a shared Qt library (libqt.so) 110 * -shared ............ Create and use a shared Qt library (libqt.so)
111 -static ............ Create and use a static Qt library (libqt.a) 111 -static ............ Create and use a static Qt library (libqt.a)
112 112
113 -qt3 ............... Configure for use with Qt 3.x 113 -qt3 ............... Configure for use with Qt 3.x
114 114
115 -platform target ... The platform you are building on ($PLATFORM) 115 -platform target ... The platform you are building on ($PLATFORM)
116EOF 116EOF
117 exit 0; 117 exit 0;
118fi 118fi
119 119
120 120
121echo Creating makefiles... 121echo Creating makefiles...
122 122
123sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v 123sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v
124mv library/library.pro-v library/library.pro 124mv library/library.pro-v library/library.pro
125 125
126if [ "$QT3" = yes ] 126if [ "$QT3" = yes ]
127then 127then
128 VCONFIG="CONFIG+=qt3" 128 VCONFIG="CONFIG+=qt3"
129else 129else
130 VCONFIG="CONFIG+=qt2" 130 VCONFIG="CONFIG+=qt2"
131fi 131fi
132 132
133if [ -f $TMAKEPATH/tmake.conf ] 133if [ -f $TMAKEPATH/tmake.conf ]
134then 134then
135 # You have tmake. We'll regenerate the file for you... 135 # You have tmake. We'll regenerate the file for you...
136 echo "Makefiles will be regenerated." 136 echo "Makefiles will be regenerated."
137fi 137fi
138 138
139H=`pwd` 139H=`pwd`
140if [ -z "$TOMAKE" ] 140if [ -z "$TOMAKE" ]
141then 141then
142 TOMAKE=`make showcomponents` 142 TOMAKE=`make showcomponents`
143fi 143fi
144 144
145for a in $TOMAKE ; do 145for a in $TOMAKE ; do
146 N=$a/Makefile 146 N=$a/Makefile
147 M=$a/Makefile.in 147 M=$a/Makefile.in
148 O=$a/Makefile.add 148 O=$a/Makefile.add
149 f=`basename $a` 149 f=`basename $a`
150 150
151 if [ -f $TMAKEPATH/tmake.conf -a -f $a/$f.pro ] 151 if [ -f $TMAKEPATH/tmake.conf -a -f $a/$f.pro ]
152 then 152 then
153 ( cd $a; 153 ( cd $a;
154 TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \ 154 TMAKEPATH=$QTDIR/tmake:$TMAKEPATH \
155 tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \ 155 tmake $QCONFIGARG CONFIG+=embedded $VCONFIG \
156 -t $H/qt/tmake/propagate.t $f.pro | 156 -t $H/qt/tmake/propagate.t $f.pro |
157 sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$QPEDIR|\$(QPEDIR)|g" >Makefile.in; 157 sed -e "s|$QTDIR|\$(QTDIR)|g" -e "s|$OPIEDIR|\$(OPIEDIR)|g" >Makefile.in;
158 ) 158 )
159 echo -n "." 159 echo -n "."
160 appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'` 160 appname=`grep '^TARGET' $a/$f.pro | sed 's/^TARGET.*=//' | sed 's/ //g'`
161 translation=`grep '^TRANSLATION' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' ` 161 translation=`grep '^TRANSLATION' $a/$f.pro | sed 's,^TRANSL.*=.*i18n\/.*\/,,' | sed 's/ //g' | sed 's,\.ts.*,,' | sed 's,^lib,,' `
162 if [ -n "$translation" -a -n "$appname" ] 162 if [ -n "$translation" -a -n "$appname" ]
163 then 163 then
164 if [ $appname != $translation ] 164 if [ $appname != $translation ]
165 then 165 then
166 echo 166 echo
167 echo "Warning: translation and appname disagree in $a/$f.pro" 167 echo "Warning: translation and appname disagree in $a/$f.pro"
168 fi 168 fi
169 fi 169 fi
170 170
171 fi 171 fi
172 172
173 cat > $N <<EOF 173 cat > $N <<EOF
174############################################################################# 174#############################################################################
175# Automatically generated from $M 175# Automatically generated from $M
176# Build options from $1 176# Build options from $1
177############################################################################# 177#############################################################################
178 178
179EOF 179EOF
180 180
181 SED= 181 SED=
182 PLATFORM_CFLAGS= 182 PLATFORM_CFLAGS=
183 183
184 if [ "$f" = "embeddedkonsole" ] 184 if [ "$f" = "embeddedkonsole" ]
185 then 185 then
186 case $PLATFORM in 186 case $PLATFORM in
187 *x86*|*generic*|*ipaq*) 187 *x86*|*generic*|*ipaq*)
188 SED="$SED /^LIBS.*=/s/\$/ -lutil/;" 188 SED="$SED /^LIBS.*=/s/\$/ -lutil/;"
189 PLATFORM_CFLAGS="-DHAVE_OPENPTY" 189 PLATFORM_CFLAGS="-DHAVE_OPENPTY"
190 ;; *) 190 ;; *)
191 SED= 191 SED=
192 esac 192 esac
193 elif [ "$f" = "libmpeg3" ] 193 elif [ "$f" = "libmpeg3" ]
194 then 194 then
195 # Patch our Makefile.in file with the platform specifics for the libmpeg3 library 195 # Patch our Makefile.in file with the platform specifics for the libmpeg3 library
196 # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code) 196 # Use the C++ compiler to compile the .c files (because the fixed-point classes are C++ code)
197 SED='s/\$(CC)/\$(CXX)/;' 197 SED='s/\$(CC)/\$(CXX)/;'
198 case $PLATFORM 198 case $PLATFORM
199 in 199 in
200 # For x86 turn on using floating point, compile mmx and css code 200 # For x86 turn on using floating point, compile mmx and css code
201 *x86*) 201 *x86*)
202 # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486" 202 # "-funroll-loops -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -march=i486"
203 PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS" 203 PLATFORM_CFLAGS="-DHAVE_MMX -DHAVE_CSS"
204 SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;" 204 SED="$SED /SOURCES.*=/s/=/= video\\/mmxidct.S video\\/reconmmx.s\ /;"
205 # For generic turn on using floating point 205 # For generic turn on using floating point