3 # WindowMaker configuration and compilation script.
5 # Copyright (c) 1997, 1998, 1999 Alfredo K. Kojima
8 export LINGUAS
;LINGUAS
=""
9 if test "$NLSDIR" = ""; then
10 export NLSDIR
;NLSDIR
="/usr/lib/locale"
18 echo "Type <Return> to continue"
26 echo "Window Maker installation failed or aborted by user."
32 echo "Usage: $(basename $0) <switch>"
33 echo "Where switches are:"
34 echo " -s --quiet make silent build"
35 echo " -h --help show this message"
46 "-s"|
"--quiet") OPTIONS
="--quiet"
48 "-h"|
"--help") help 0;;
49 *) echo "bad command-line parameter $1"
55 trap "echo Window Maker installation aborted. ; exit 1" 2 3
58 echo "========================="
59 echo "Window Maker Installation"
60 echo "========================="
62 echo "NOTE: If this script fails, read the INSTALL file and"
63 echo "install by hand."
65 echo "Please read the README, INSTALL and FAQ files before e-mailing "
66 echo "questions. We will IGNORE any questions that are already"
67 echo "answered in the documentation."
71 echo "Did you install libPropList? If not, please install it now."
74 echo "Did you read the INSTALL file?"
77 if [ "$rtfm" != y
]; then
78 echo "Please read the INSTALL file before installing"
84 if [ "$rtfm" != y
]; then
85 echo "Please read the INSTALL file before installing"
91 if [ "$rtfm" != n
]; then
93 echo "Please read the INSTALL file before installing"
96 echo "Do you *swear* that you really read the INSTALL file?"
99 if [ "$rtfm" != y
]; then
100 echo "Please read the INSTALL file before installing"
103 echo "Last chance. You will not get help if you have some problem"
104 echo "because you didn't read that file. Even if your computer explodes."
105 echo "Do you *really* read it?"
108 if [ "$rtfm" != y
]; then
109 echo "Please read the INSTALL file before installing"
113 echo "Ok, you have been warned."
118 if test "$USER" != "root"; then
120 echo "Warning: you must run this script as root to install"
121 echo "Window Maker. Hit <Control>-<C> to quit this script."
128 echo "Option Selection"
129 echo "================"
131 ######################## KDE
133 echo "Do you want KDE support?"
136 if [ "$kde" = y
-o "$kde" = Y
]; then
137 OPTIONS
="$OPTIONS --enable-kde"
140 ######################## GNOME
142 echo "Do you want GNOME support?"
145 if [ "$gnome" = y
-o "$gnome" = Y
]; then
146 OPTIONS
="$OPTIONS --enable-gnome"
149 ######################## OLWM
151 echo "Do you want OPEN LOOK(tm)/olwm support?"
154 if [ "$olwm" = y
-o "$olwm" = Y
]; then
155 OPTIONS
="$OPTIONS --enable-openlook"
158 ######################## NLS
160 echo "Do you want National Language Support?"
164 if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
166 echo "The supported locales are:"
167 ling
=` (cd po; /bin/ls *.po) `
170 lname
=`(cd po; grep Language-Team $l|cut -f2- -d:|cut -f1 -d\\\\|cut -f1 -d\<)`
172 lcode
=`basename $l .po`
173 ALL_LINGUAS
="$ALL_LINGUAS $lcode"
176 echo "Type in the locales you want (all will install everything) [none]"
178 if test "$foo" = "all"; then
179 LINGUAS
="$ALL_LINGUAS"
183 echo "Selected locales are: $LINGUAS"
186 for i
in $LINGUAS; do
188 for b
in $ALL_LINGUAS; do
189 if test "$b" = "$i"; then
194 if test "$ok" = "0"; then
196 echo "$i is not a supported locale"
203 echo "Where do you want to put the message files? [$NLSDIR]"
206 if test "x$foo" != "x"; then
210 ##################### Installation path
213 while [ $done = 0 ]; do
215 echo "Where do you want to install Window Maker? [$PREFIX]"
216 echo "Don't change it if you don't know what you're doing."
217 if test "$USER" != "root"; then
218 echo "Make sure to specify a path where you have write permission."
220 echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
223 if test "x$foo" != "x"; then
224 if [ "$foo" = "y" -o "$foo" = "n" ]; then
226 echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
236 echo " $PREFIX/bin must be in the PATH environment variable"
237 echo "of all users who will use Window Maker"
241 OPTIONS
="$OPTIONS --prefix=$PREFIX"
244 ##################### Install stripped binaries?
247 echo "Do you want stripped binaries to be installed?"
248 echo "Installed binaries will be smaller (with debug info removed)."
251 if [ "$foo" = y
-o "$foo" = Y
]; then
252 INSTALL
="install-strip"
256 ##################### Configure
257 echo "--------------------------"
258 echo "Configuring Window Maker..."
259 echo "--------------------------"
260 if [ `uname -s` = "SCO_SV" ]; then
261 echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
263 CFLAGS
="$CFLAGS -belf -DANSICPP"
265 perform .
/configure
$OPTIONS
267 echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
269 CFLAGS
="$CFLAGS $GCCFLAGS"
271 perform .
/configure
$OPTIONS
275 #################### Compile
276 echo "-------------------------"
277 echo "Compiling Window Maker..."
278 echo "-------------------------"
279 (cd src
; perform
make $MAKE_OPTIONS clean
)
280 perform
make $MAKE_OPTIONS
282 echo "--------------------------"
283 echo "Installing Window Maker..."
284 echo "--------------------------"
286 perform
make $MAKE_OPTIONS $INSTALL
288 if [ `uname -s` = "Linux" ]; then
290 echo " Make sure $PREFIX/lib is in the /etc/ld.so.conf file"
295 echo "Installation Finished!"
297 echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
298 echo "script that was just installed."
301 if test "$NLS" = "Y"; then
302 echo "Don't forget to set the LANG environment variable to your locale"