summaryrefslogtreecommitdiff
path: root/configure
Unidiff
Diffstat (limited to 'configure') (more/less context) (ignore whitespace changes)
-rwxr-xr-xconfigure11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure b/configure
index 3b474c6..1652527 100755
--- a/configure
+++ b/configure
@@ -1,127 +1,138 @@
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=generic 8PLATFORM=generic
9SHARING=shared 9SHARING=shared
10DEBUG= 10DEBUG=
11QCONFIGARG= 11QCONFIGARG=
12 12
13touch .test.qpe. 13touch .test.qpe.
14if [ '!' -f ${OPIEDIR}/.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 $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
29fi 29fi
30rm .test.qpe. 30rm .test.qpe.
31 31
32if [ '!' -f $TMAKEPATH/tmake.conf ]
33then
34 # You have tmake. We'll regenerate the file for you...
35 echo ' The environment variable $TMAKEPATH is not set correclty. '
36 echo ' It should be set to the tmake path'
37 echo
38 echo ' Please read the INSTALL file for instructions on how to set $TMAKEPATH'
39 echo ' to the environment variable correctly.'
40 exit 1
41fi
42
32VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <library/version.h) 43VERSION_MAJ=$(sed -n -e 's/.*QPE_VERSION "\([0-9]*\)\.[0-9]*\.[0-9]*.*".*/\1/p' <library/version.h)
33VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <library/version.h) 44VERSION_MIN=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.\([0-9]\)\.[0-9]*.*".*/\1/p' <library/version.h)
34VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <library/version.h) 45VERSION_PAT=$(sed -n -e 's/.*QPE_VERSION "[0-9]*\.[0-9]*\.\([0-9]*\).*".*/\1/p' <library/version.h)
35 46
36TOMAKE= 47TOMAKE=
37 48
38if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h 49if grep -q 'VERSION_STR.*"3' $QTDIR/include/qglobal.h
39then 50then
40 QT3=yes 51 QT3=yes
41else 52else
42 QT3=no 53 QT3=no
43fi 54fi
44 55
45# Parse the arguments, setting things to "yes" or "no". 56# Parse the arguments, setting things to "yes" or "no".
46 57
47while [ -n "$1" ]; do 58while [ -n "$1" ]; do
48 case $1 in 59 case $1 in
49 -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.
50 shift; PLATFORM=$1 61 shift; PLATFORM=$1
51 ;; 62 ;;
52 -release) 63 -release)
53 DEBUG= 64 DEBUG=
54 ;; 65 ;;
55 -debug) 66 -debug)
56 DEBUG=-debug 67 DEBUG=-debug
57 ;; 68 ;;
58 -shared) 69 -shared)
59 SHARING=shared 70 SHARING=shared
60 ;; 71 ;;
61 -static) 72 -static)
62 SHARING=static 73 SHARING=static
63 ;; 74 ;;
64 -qconfig) 75 -qconfig)
65 # 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
66 shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that. 77 shift; QCONFIGARG=DEFINES+=QCONFIG='\"'$1'\"' # Don't quote me on that.
67 ;; 78 ;;
68 -make) 79 -make)
69 shift; TOMAKE="$TOMAKE $1" 80 shift; TOMAKE="$TOMAKE $1"
70 ;; 81 ;;
71 -qt3) 82 -qt3)
72 QT3=yes 83 QT3=yes
73 ;; 84 ;;
74 *) 85 *)
75 HELP=yes;; 86 HELP=yes;;
76 esac 87 esac
77 shift 88 shift
78done 89done
79 90
80TARGET=configs/$PLATFORM-$SHARING$DEBUG 91TARGET=configs/$PLATFORM-$SHARING$DEBUG
81 92
82if [ '!' -f $TARGET ] 93if [ '!' -f $TARGET ]
83then 94then
84 if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ] 95 if [ -f configs/linux-$PLATFORM-g++-$SHARING$DEBUG ]
85 then 96 then
86 TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG 97 TARGET=configs/linux-$PLATFORM-g++-$SHARING$DEBUG
87 else 98 else
88 echo 99 echo
89 echo ' The specified platform/compiler not supported: ' $TARGET 100 echo ' The specified platform/compiler not supported: ' $TARGET
90 echo 101 echo
91 exit 2 102 exit 2
92 fi 103 fi
93fi 104fi
94 105
95# Next, emit a usage message if something failed. 106# Next, emit a usage message if something failed.
96 107
97if [ "$HELP" = "yes" ]; then 108if [ "$HELP" = "yes" ]; then
98 cat <<EOF 109 cat <<EOF
99Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...] 110Usage: $0 [-debug] [-release] [-shared] [-static] [-qt3] [-platform ...]
100 111
101The defaults (*) are usually acceptable. Here is a short explanation of 112The defaults (*) are usually acceptable. Here is a short explanation of
102each option: 113each option:
103 114
104 * -release ........... Compile and link Qt with debugging turned off. 115 * -release ........... Compile and link Qt with debugging turned off.
105 -debug ............. Compile and link Qt with debugging turned on. 116 -debug ............. Compile and link Qt with debugging turned on.
106 117
107 * -shared ............ Create and use a shared Qt library (libqt.so) 118 * -shared ............ Create and use a shared Qt library (libqt.so)
108 -static ............ Create and use a static Qt library (libqt.a) 119 -static ............ Create and use a static Qt library (libqt.a)
109 120
110 -qt3 ............... Configure for use with Qt 3.x 121 -qt3 ............... Configure for use with Qt 3.x
111 122
112 -platform target ... The platform you are building on ($PLATFORM) 123 -platform target ... The platform you are building on ($PLATFORM)
113EOF 124EOF
114 exit 0; 125 exit 0;
115fi 126fi
116 127
117if [ -f library/custom-$PLATFORM.h ] 128if [ -f library/custom-$PLATFORM.h ]
118then 129then
119 rm -f library/custom.h 130 rm -f library/custom.h
120 ln -s custom-$PLATFORM.h library/custom.h 131 ln -s custom-$PLATFORM.h library/custom.h
121fi 132fi
122 133
123mkdir -p include/qpe 134mkdir -p include/qpe
124( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; ) 135( cd include/qpe && rm -f *.h; ln -s ../../library/*.h .; ln -s ../../library/backend/*.h .; rm -f *_p.h; )
125 136
126echo Creating makefiles... 137echo Creating makefiles...
127 138