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"
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 "
46 if test "$USER" != "root"; then
48 echo "Warning: you must run this script as root to install"
49 echo "Window Maker. Hit <Control>-<C> to quit this script."
56 echo "Option Selection"
57 echo "================"
60 ######################## NLS
62 echo "Do you want National Language Support?"
66 if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
68 echo "The supported locales are:"
69 ling
=` (cd po; /bin/ls *.po) `
72 lname
=`(cd po; grep Language-Team $l|cut -f 2 -d: |cut -f 2 -d\ )`
74 lcode
=`basename $l .po`
75 ALL_LINGUAS
="$ALL_LINGUAS $lcode"
78 echo "Type in the locales you want (all will install everything) [none]"
80 if test "$foo" = "all"; then
81 LINGUAS
="$ALL_LINGUAS"
85 echo "Selected locales are: $LINGUAS"
90 for b
in $ALL_LINGUAS; do
91 if test "$b" = "$i"; then
96 if test "$ok" = "0"; then
98 echo "$i is not a supported locale"
103 if [ "$MB" = "" -a "$i" = "ja" -o "$i" = "kr" ]; then
105 echo "A language you selected needs multi-byte character support"
106 echo "Do you want to enable it?"
109 if [ "$MB" = "y" -o "$MB" = "Y" ]; then
110 OPTIONS
="$OPTIONS --enable-kanji"
115 echo "Where do you want to put the message files? [$NLSDIR]"
118 if test "x$foo" != "x"; then
122 ##################### Installation path
125 while [ $done = 0 ]; do
127 echo "Where do you want to install Window Maker? [$PREFIX]"
128 echo "Don't change it if you don't know what you're doing."
129 if test $USER != root
; then
130 echo "Make sure to specify a path where you have write permission."
132 echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
135 if test "x$foo" != "x"; then
136 if [ "$foo" = "y" -o "$foo" = "n" ]; then
138 echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
148 echo "$PREFIX/bin must be in the PATH environment variable of all users who use Window Maker"
152 OPTIONS
="$OPTIONS --prefix=$PREFIX"
156 ##################### Configure
157 echo "--------------------------"
158 echo "Configuring Window Maker..."
159 echo "--------------------------"
160 if [ `uname -s` = "SCO_SV" ]; then
161 echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
163 CFLAGS
="$CFLAGS -belf -DANSICPP"
165 perform .
/configure
$OPTIONS
167 echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
169 CFLAGS
="$CFLAGS $GCCFLAGS"
171 perform .
/configure
$OPTIONS
175 #################### Compile
176 echo "-------------------------"
177 echo "Compiling Window Maker..."
178 echo "-------------------------"
179 (cd src
; perform
make clean
)
182 echo "--------------------------"
183 echo "Installing Window Maker..."
184 echo "--------------------------"
189 echo "Installation Finished!"
191 echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
192 echo "script that was just installed."
195 if test "$NLS" = "Y"; then
196 echo "Don't forget to set the LANG environment variable to your locale"