3 # WindowMaker configuration and compilation script.
5 # Copyright (c) 1997, 1998 Alfredo K. Kojima
8 export LINGUAS
;LINGUAS
=""
9 if test "$NLSDIR" = ""; then
10 export NLSDIR
;NLSDIR
="/usr/lib/locale"
17 echo "Type <Return> to continue"
25 if [ "$result" != 0 ]; then
27 echo "Window Maker installation failed or aborted by user."
33 trap "echo Window Maker installation aborted. ; exit 1" 2 3
36 echo "========================="
37 echo "Window Maker Installation"
38 echo "========================="
40 echo "NOTE: If this script fails, read the INSTALL file and"
41 echo "install by hand."
43 echo "Please read the INSTALL and FAQ files before e-mailing "
47 if test "$USER" != "root"; then
49 echo "Warning: you must run this script as root to install"
50 echo "Window Maker. Hit <Control>-<C> to quit this script."
57 echo "Option Selection"
58 echo "================"
60 ######################## Sound
63 echo "Do you want sound support? Note that you need a module distributed"
64 echo "separately to make it work. You can get it at:"
65 echo "http://www.frontiernet.net/~southgat/wmsound"
69 if [ "x$SFX" = "x" -o "$SFX" = "y" -o "$SFX" = "Y" ]; then
70 OPTIONS
="$OPTIONS --enable-sound"
73 ######################## NLS
75 echo "Do you want National Language Support?"
79 if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
81 echo "The supported locales are:"
82 ling
=` (cd po; /bin/ls *.po) `
85 lname
=`(cd po; grep Language-Team $l|cut -f 2 -d: |cut -f 2 -d\ )`
87 lcode
=`basename $l .po`
88 ALL_LINGUAS
="$ALL_LINGUAS $lcode"
91 echo "Type in the locales you want [$ALL_LINGUAS]"
93 if test "x$foo" = "x"; then
98 echo "Selected locales are: $LINGUAS"
101 for i
in $LINGUAS; do
103 for b
in $ALL_LINGUAS; do
104 if test "$b" = "$i"; then
109 if test "$ok" = "0"; then
111 echo "$i is not a supported locale"
116 if [ "$MB" = "" -a "$i" = "ja" -o "$i" = "kr" ]; then
118 echo "A language you selected needs multi-byte character support"
119 echo "Do you want to enable it?"
122 if [ "$MB" = "y" -o "$MB" = "Y" ]; then
123 OPTIONS
="$OPTIONS --enable-kanji"
128 echo "Where do you want to put the message files? [$NLSDIR]"
131 if test "x$foo" != "x"; then
135 ##################### Installation path
138 while [ $done = 0 ]; do
140 echo "Where do you want to install Window Maker? [$PREFIX]"
141 echo "Don't change it if you don't know what you're doing."
142 if test $USER != root
; then
143 echo "Make sure to specify a path where you have write permission."
145 echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
148 if test "x$foo" != "x"; then
149 if [ "$foo" = "y" -o "$foo" = "n" ]; then
151 echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
161 echo "$PREFIX/bin must be in the PATH environment variable of all users who use Window Maker"
165 OPTIONS
="$OPTIONS --prefix=$PREFIX"
169 ##################### Configure
170 echo "--------------------------"
171 echo "Configuring Window Maker..."
172 echo "--------------------------"
173 if [ `uname -s` = "SCO_SV" ]; then
174 echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
176 perform CFLAGS
=\"$CFLAGS -belf -DANSICPP\" .
/configure
$OPTIONS
178 echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
180 perform CFLAGS
=\"$CFLAGS $GCCFLAGS\" .
/configure
$OPTIONS
184 #################### Compile
185 echo "-------------------------"
186 echo "Compiling Window Maker..."
187 echo "-------------------------"
188 perform
(cd src
; make clean
)
191 echo "--------------------------"
192 echo "Installing Window Maker..."
193 echo "--------------------------"
198 echo "Installation Finished!"
200 echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
201 echo "script that was just installed."
204 if test "$NLS" = "Y"; then
205 echo "Don't forget to set the LANG environment variable to your locale"