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 trap "echo Window Maker installation aborted. ; exit 1" 2 3
35 echo "========================="
36 echo "Window Maker Installation"
37 echo "========================="
39 echo "NOTE: If this script fails, read the INSTALL file and"
40 echo "install by hand."
42 echo "Please read the INSTALL and FAQ files before e-mailing "
43 echo "questions. (we are lazy to reply questions already answered "
44 echo "there as much as you are lazy to read these ;) "
46 echo "Did you read the INSTALL file?"
49 if [ "$rtfm" != y
]; then
50 echo "Please read the INSTALL file before installing"
56 if [ "$rtfm" != y
]; then
57 echo "Please read the INSTALL file before installing"
63 if [ "$rtfm" != n
]; then
65 echo "Please read the INSTALL file before installing"
68 echo "Do you *swear* that you really read the INSTALL file?"
71 if [ "$rtfm" != y
]; then
72 echo "Please read the INSTALL file before installing"
75 echo "Last chance. You will not get help if you have some problem"
76 echo "because you didn't read that file. Even if your computer explodes."
77 echo "Do you *really* read it?"
80 if [ "$rtfm" != y
]; then
81 echo "Please read the INSTALL file before installing"
85 echo "Ok, you have been warned."
90 if test "$USER" != "root"; then
92 echo "Warning: you must run this script as root to install"
93 echo "Window Maker. Hit <Control>-<C> to quit this script."
100 echo "Option Selection"
101 echo "================"
103 ######################## KDE
105 echo "Do you want KDE support?"
108 if [ "$kde" = y
-o "$kde" = Y
]; then
109 OPTIONS
="$OPTIONS --enable-kde"
112 ######################## GNOME
114 echo "Do you want GNOME support?"
117 if [ "$gnome" = y
-o "$gnome" = Y
]; then
118 OPTIONS
="$OPTIONS --enable-gnome"
121 ######################## OLWM
123 echo "Do you want OPEN LOOK(tm)/olwm support?"
126 if [ "$olwm" = y
-o "$olwm" = Y
]; then
127 OPTIONS
="$OPTIONS --enable-openlook"
130 ######################## NLS
132 echo "Do you want National Language Support?"
136 if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
138 echo "The supported locales are:"
139 ling
=` (cd po; /bin/ls *.po) `
142 lname
=`(cd po; grep Language-Team $l|cut -f 2 -d: |cut -f 2 -d\ )`
144 lcode
=`basename $l .po`
145 ALL_LINGUAS
="$ALL_LINGUAS $lcode"
148 echo "Type in the locales you want (all will install everything) [none]"
150 if test "$foo" = "all"; then
151 LINGUAS
="$ALL_LINGUAS"
155 echo "Selected locales are: $LINGUAS"
158 for i
in $LINGUAS; do
160 for b
in $ALL_LINGUAS; do
161 if test "$b" = "$i"; then
166 if test "$ok" = "0"; then
168 echo "$i is not a supported locale"
173 if [ "$MB" = "" -a "$i" = "ja" -o "$i" = "kr" ]; then
175 echo "A language you selected needs multi-byte character support"
176 echo "Do you want to enable it?"
179 if [ "$MB" = "y" -o "$MB" = "Y" ]; then
180 OPTIONS
="$OPTIONS --enable-kanji"
185 echo "Where do you want to put the message files? [$NLSDIR]"
188 if test "x$foo" != "x"; then
192 ##################### Installation path
195 while [ $done = 0 ]; do
197 echo "Where do you want to install Window Maker? [$PREFIX]"
198 echo "Don't change it if you don't know what you're doing."
199 if test "$USER" != "root"; then
200 echo "Make sure to specify a path where you have write permission."
202 echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
205 if test "x$foo" != "x"; then
206 if [ "$foo" = "y" -o "$foo" = "n" ]; then
208 echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
218 echo " $PREFIX/bin must be in the PATH environment variable"
219 echo "of all users who will use Window Maker"
221 echo " Make sure $PREFIX/lib is in the /etc/ld.so.conf file"
225 OPTIONS
="$OPTIONS --prefix=$PREFIX"
229 ##################### Configure
230 echo "--------------------------"
231 echo "Configuring Window Maker..."
232 echo "--------------------------"
233 if [ `uname -s` = "SCO_SV" ]; then
234 echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
236 CFLAGS
="$CFLAGS -belf -DANSICPP"
238 perform .
/configure
$OPTIONS
240 echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
242 CFLAGS
="$CFLAGS $GCCFLAGS"
244 perform .
/configure
$OPTIONS
248 #################### Compile
249 echo "-------------------------"
250 echo "Compiling Window Maker..."
251 echo "-------------------------"
252 (cd src
; perform
make clean
)
255 echo "--------------------------"
256 echo "Installing Window Maker..."
257 echo "--------------------------"
261 if [ `uname -s` = "Linux" ]; then
266 echo "Installation Finished!"
268 echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
269 echo "script that was just installed."
272 if test "$NLS" = "Y"; then
273 echo "Don't forget to set the LANG environment variable to your locale"