author | kergoth <kergoth> | 2002-01-31 18:35:48 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-31 18:35:48 (UTC) |
commit | 2802e5a2b474101a50bf95e707061ca5542876fd (patch) (unidiff) | |
tree | a1015514ef9e48df091903cccf0d3174e272f663 /configure | |
parent | 48a922e687e82dc8ebe2bc3cb17dcaa8dcae62bd (diff) | |
download | opie-2802e5a2b474101a50bf95e707061ca5542876fd.zip opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.gz opie-2802e5a2b474101a50bf95e707061ca5542876fd.tar.bz2 |
*** empty log message ***
-rwxr-xr-x | configure | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -1,61 +1,58 @@ | |||
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 | ||
8 | PLATFORM=linux-generic-g++ | 8 | PLATFORM=generic |
9 | SHARING=shared | 9 | SHARING=shared |
10 | DEBUG= | 10 | DEBUG= |
11 | QCONFIGARG= | 11 | QCONFIGARG= |
12 | 12 | ||
13 | touch .test.qpe. | 13 | touch .test.qpe. |
14 | if [ '!' -f ${OPIEDIR}/.test.qpe. ]; | 14 | if [ '!' -f ${OPIEDIR}/.test.qpe. ]; |
15 | then | 15 | then |
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 |
29 | fi | 29 | fi |
30 | rm .test.qpe. | 30 | rm .test.qpe. |
31 | 31 | ||
32 | mkdir -p include/qpe | 32 | VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <library/version.h) |
33 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) | 33 | VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <library/version.h) |
34 | 34 | VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <library/version.h) | |
35 | VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <include/qpe/version.h) | ||
36 | VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <include/qpe/version.h) | ||
37 | VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <include/qpe/version.h) | ||
38 | 35 | ||
39 | TOMAKE= | 36 | TOMAKE= |
40 | 37 | ||
41 | if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h | 38 | if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h |
42 | then | 39 | then |
43 | QT3=yes | 40 | QT3=yes |
44 | else | 41 | else |
45 | QT3=no | 42 | QT3=no |
46 | fi | 43 | fi |
47 | 44 | ||
48 | # Parse the arguments, setting things to "yes" or "no". | 45 | # Parse the arguments, setting things to "yes" or "no". |
49 | 46 | ||
50 | while [ -n "$1" ]; do | 47 | while [ -n "$1" ]; do |
51 | case $1 in | 48 | case $1 in |
52 | -platform|-xplatform) # No difference since we don't need to build moc, etc. | 49 | -platform|-xplatform) # No difference since we don't need to build moc, etc. |
53 | shift; PLATFORM=$1 | 50 | shift; PLATFORM=$1 |
54 | ;; | 51 | ;; |
55 | -release) | 52 | -release) |
56 | DEBUG= | 53 | DEBUG= |
57 | ;; | 54 | ;; |
58 | -debug) | 55 | -debug) |
59 | DEBUG=-debug | 56 | DEBUG=-debug |
60 | ;; | 57 | ;; |
61 | -shared) | 58 | -shared) |
@@ -96,48 +93,56 @@ then | |||
96 | fi | 93 | fi |
97 | 94 | ||
98 | # Next, emit a usage message if something failed. | 95 | # Next, emit a usage message if something failed. |
99 | 96 | ||
100 | if [ "$HELP" = "yes" ]; then | 97 | if [ "$HELP" = "yes" ]; then |
101 | cat <<EOF | 98 | cat <<EOF |
102 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] | 99 | Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] |
103 | 100 | ||
104 | The defaults (*) are usually acceptable. Here is a short explanation of | 101 | The defaults (*) are usually acceptable. Here is a short explanation of |
105 | each option: | 102 | each option: |
106 | 103 | ||
107 | * -release ........... Compile and link Qt with debugging turned off. | 104 | * -release ........... Compile and link Qt with debugging turned off. |
108 | -debug ............. Compile and link Qt with debugging turned on. | 105 | -debug ............. Compile and link Qt with debugging turned on. |
109 | 106 | ||
110 | * -shared ............ Create and use a shared Qt library (libqt.so) | 107 | * -shared ............ Create and use a shared Qt library (libqt.so) |
111 | -static ............ Create and use a static Qt library (libqt.a) | 108 | -static ............ Create and use a static Qt library (libqt.a) |
112 | 109 | ||
113 | -qt3 ............... Configure for use with Qt 3.x | 110 | -qt3 ............... Configure for use with Qt 3.x |
114 | 111 | ||
115 | -platform target ... The platform you are building on ($PLATFORM) | 112 | -platform target ... The platform you are building on ($PLATFORM) |
116 | EOF | 113 | EOF |
117 | exit 0; | 114 | exit 0; |
118 | fi | 115 | fi |
119 | 116 | ||
117 | if [ -f library/custom-$PLATFORM.h ] | ||
118 | then | ||
119 | rm -f library/custom.h | ||
120 | ln -s custom-$PLATFORM.h library/custom.h | ||
121 | fi | ||
122 | |||
123 | mkdir -p include/qpe | ||
124 | ( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) | ||
120 | 125 | ||
121 | echo Creating makefiles... | 126 | echo Creating makefiles... |
122 | 127 | ||
123 | sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v | 128 | sed -e 's/^\(VERSION.*= \).*/\1'$VERSION_MAJ.$VERSION_MIN.$VERSION_PAT/ <library/library.pro >library/library.pro-v |
124 | mv library/library.pro-v library/library.pro | 129 | mv library/library.pro-v library/library.pro |
125 | 130 | ||
126 | if [ "$QT3" = yes ] | 131 | if [ "$QT3" = yes ] |
127 | then | 132 | then |
128 | VCONFIG="CONFIG+=qt3" | 133 | VCONFIG="CONFIG+=qt3" |
129 | else | 134 | else |
130 | VCONFIG="CONFIG+=qt2" | 135 | VCONFIG="CONFIG+=qt2" |
131 | fi | 136 | fi |
132 | 137 | ||
133 | if [ -f $TMAKEPATH/tmake.conf ] | 138 | if [ -f $TMAKEPATH/tmake.conf ] |
134 | then | 139 | then |
135 | # You have tmake. We'll regenerate the file for you... | 140 | # You have tmake. We'll regenerate the file for you... |
136 | echo "Makefiles will be regenerated." | 141 | echo "Makefiles will be regenerated." |
137 | fi | 142 | fi |
138 | 143 | ||
139 | H=`pwd` | 144 | H=`pwd` |
140 | if [ -z "$TOMAKE" ] | 145 | if [ -z "$TOMAKE" ] |
141 | then | 146 | then |
142 | TOMAKE=`make showcomponents` | 147 | TOMAKE=`make showcomponents` |
143 | fi | 148 | fi |