author | truelight |
Tue, 14 Mar 2006 19:15:46 +0000 | |
changeset 3199 | c5ac6b7f6ef6 |
parent 3198 | 54e4474378f7 |
child 3200 | faafc2eb520f |
permissions | -rwxr-xr-x |
3198
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
1 |
#!/bin/sh |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
2 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
3 |
# This 'configure' script is a very easy wrapper around 'make updateconf' |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
4 |
# It allows cross-compilers to do their job much more easy. |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
5 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
6 |
function showhelp() { |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
7 |
echo "Configure for OpenTTD" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
8 |
echo "" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
9 |
echo "Usage:" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
10 |
echo " $0 --your_options" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
11 |
echo "" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
12 |
echo "Params:" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
13 |
echo " --target-cc Sets the target-compiler [\$CC]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
14 |
echo " --target-cxx Sets the C++ target-compiler []" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
15 |
echo " --host-cc Sets the host-compiler [\$CC]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
16 |
echo " --os Sets the OS. Listens to: [detected]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
17 |
echo " UNIX, OSX, FREEBSD, MORPHOS" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
18 |
echo " BEOS, SUNOS, CYGWIN, MINGW" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
19 |
echo " --windres Sets the windres (Windows) [windres]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
20 |
echo " --force-le Force LE platform [no]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
21 |
echo " --force-be Force BE platform [no]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
22 |
echo "" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
23 |
echo "Params that can be used with --with or --without" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
24 |
echo " (e.g.: --without-static disables static (default))" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
25 |
echo " static Do you want a static build? [no]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
26 |
echo " directmusic Do you want direct-music? [no]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
27 |
echo " zlib Do you want zlib-support? [yes]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
28 |
echo " sdl Do you want SDL-support? [yes]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
29 |
echo " png Do you want PNG-support? [yes]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
30 |
echo " cocoa Do you want cocoa-support? (MacOSX) [no]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
31 |
echo "" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
32 |
echo "Params used to configure external libs:" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
33 |
echo " --static-zlib-path Set the path to your static zlib []" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
34 |
echo " --sdl-config Where is your sdl-config [sdl-config]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
35 |
echo " --libpng-config Where is your libpng-config [libpng-config]" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
36 |
echo " " |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
37 |
} |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
38 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
39 |
function handle() { |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
40 |
PARAM="$PARAM $1=`awk 'BEGIN { FS="="; $0="'$2'"; print $2;}'`" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
41 |
} |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
42 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
43 |
# The things you can use inside this case: |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
44 |
# handle NAME VALUE - Sets the value to give the 'make upgradeconf' |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
45 |
# Value is in form: tag=REAL_VALUE |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
46 |
# ITEM="NAME" - Will set the value as above, only with the next param |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
47 |
# SITEM="NAME" - Will set the var $NAME to the next param |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
48 |
for n in $* |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
49 |
do |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
50 |
case "$n" in |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
51 |
--help | -h) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
52 |
showhelp |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
53 |
exit 0 |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
54 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
55 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
56 |
--target-cc=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
57 |
handle "CC_TARGET" $n |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
58 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
59 |
--target-cc) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
60 |
ITEM="CCTARGET" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
61 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
62 |
--target-cxx=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
63 |
TARGET_CXX=`awk 'BEGIN { FS="="; $0="'$n'"; print $2;}'` |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
64 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
65 |
--target-cxx) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
66 |
SITEM="TARGET_CXX" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
67 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
68 |
--host-cc=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
69 |
handle CC_HOST $n |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
70 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
71 |
--host-cc) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
72 |
ITEM="CC_HOST" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
73 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
74 |
--os=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
75 |
OS=`awk 'BEGIN { FS="="; $0="'$n'"; print $2;}'` |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
76 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
77 |
--os) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
78 |
SITEM="OS" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
79 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
80 |
--windres=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
81 |
handle WINDRES $n |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
82 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
83 |
--windres) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
84 |
ITEM="WINDRES" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
85 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
86 |
--force-le) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
87 |
PARAM="$PARAM ENDIAN_FORCE=LE" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
88 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
89 |
--force-be) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
90 |
PARAM="$PARAM ENDIAN_FORCE=BE" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
91 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
92 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
93 |
--with-static) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
94 |
PARAM="$PARAM STATIC=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
95 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
96 |
--without-static) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
97 |
PARAM="$PARAM STATIC=" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
98 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
99 |
--with-directmusic) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
100 |
PARAM="$PARAM WITH_DIRECTMUSIC=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
101 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
102 |
--without-directmusic) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
103 |
PARAM="$PARAM WITH_DIRECTMUSIC=" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
104 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
105 |
--with-zlib) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
106 |
PARAM="$PARAM WITH_ZLIB=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
107 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
108 |
--without-zlib) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
109 |
PARAM="$PARAM WITH_ZLIB=" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
110 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
111 |
--with-sdl) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
112 |
PARAM="$PARAM WITH_SDL=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
113 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
114 |
--without-sdl) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
115 |
PARAM="$PARAM WITH_SDL=" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
116 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
117 |
--with-png) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
118 |
PARAM="$PARAM WITH_PNG=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
119 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
120 |
--without-png) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
121 |
PARAM="$PARAM WITH_PNG=" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
122 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
123 |
--with-cocoa) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
124 |
PARAM="$PARAM WITH_COCOA=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
125 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
126 |
--without-cocoa) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
127 |
PARAM="$PARAM WITH_COCOA=" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
128 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
129 |
--static-zlib-path=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
130 |
handle STATIC_ZLIB_PATH $n |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
131 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
132 |
--static-zlib-path) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
133 |
ITEM="STATIC_ZLIB_PATH" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
134 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
135 |
--sdl-config=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
136 |
handle SDL-CONFIG $n |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
137 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
138 |
--sdl-config) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
139 |
ITEM="SDL-CONFIG" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
140 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
141 |
--libpng-config=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
142 |
handle LIBPNG-CONFIG $n |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
143 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
144 |
--lib-png-config) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
145 |
ITEM="LIBPNG-CONFIG" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
146 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
147 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
148 |
--*=*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
149 |
echo -n "Unknown switch " |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
150 |
echo `awk 'BEGIN { FS="="; $0="'$n'"; print $1;}'` |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
151 |
exit 1 |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
152 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
153 |
-*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
154 |
echo "Unknown switch $n" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
155 |
exit 1 |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
156 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
157 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
158 |
*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
159 |
if ! test -z "$ITEM" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
160 |
then |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
161 |
PARAM="$PARAM $ITEM=$n" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
162 |
ITEM=""; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
163 |
elif ! test -z "$SITEM" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
164 |
then |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
165 |
export $SITEM=$n |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
166 |
SITEM="" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
167 |
else |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
168 |
echo "Unknown switch $n" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
169 |
exit 1 |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
170 |
fi |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
171 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
172 |
esac |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
173 |
done |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
174 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
175 |
if ! test -z "$OS" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
176 |
then |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
177 |
OS=`echo $OS | tr '[:lower:]' '[:upper:]'` |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
178 |
case "$OS" in |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
179 |
WIN32) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
180 |
PARAM="$PARAM WIN32=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
181 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
182 |
UNIX) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
183 |
PARAM="$PARAM UNIX=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
184 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
185 |
OSX) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
186 |
PARAM="$PARAM OSX=1 UNIX=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
187 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
188 |
FREEBSD) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
189 |
PARAM="$PARAM FREEBSD=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
190 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
191 |
MORPHOS) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
192 |
PARAM="$PARAM MORPHOS=1 UNIX=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
193 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
194 |
BEOS) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
195 |
PARAM="$PARAM BEOS=1 UNIX=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
196 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
197 |
SUNOS) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
198 |
PARAM="$PARAM SUNOS=1 UNIX=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
199 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
200 |
CYGWIN) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
201 |
PARAM="$PARAM CYGWIN=1 WIN32=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
202 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
203 |
MINGW) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
204 |
PARAM="$PARAM MINGW=1 WIN32=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
205 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
206 |
*) |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
207 |
echo "Unknown OS: $OS" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
208 |
exit 1 |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
209 |
;; |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
210 |
esac |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
211 |
PARAM="$PARAM BYPASS_OS_DETECT=1" |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
212 |
fi |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
213 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
214 |
rm Makefile.config |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
215 |
make upgradeconf $PARAM |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
216 |
|
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
217 |
# Makefile.config currently doesn't support custom CXX, so, we add the line |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
218 |
# ourself! |
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
219 |
|
3199 | 220 |
if ! test -z "$TARGET_CXX" |
221 |
then |
|
222 |
echo "CXX=$TARGET_CXX" >> Makefile.config |
|
223 |
fi |
|
3198
54e4474378f7
(svn r3865) -Add: a fully optional configure script, that is a wrapper around
truelight
parents:
diff
changeset
|
224 |