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 "
43 echo "questions. (we are lazy to reply questions already answered "
44 echo "there as much as you are lazy to read these ;) "
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 "================"
61 ######################## NLS
63 echo "Do you want National Language Support?"
67 if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
69 echo "The supported locales are:"
70 ling
=` (cd po; /bin/ls *.po) `
73 lname
=`(cd po; grep Language-Team $l|cut -f 2 -d: |cut -f 2 -d\ )`
75 lcode
=`basename $l .po`
76 ALL_LINGUAS
="$ALL_LINGUAS $lcode"
79 echo "Type in the locales you want (all will install everything) [none]"
81 if test "$foo" = "all"; then
82 LINGUAS
="$ALL_LINGUAS"
86 echo "Selected locales are: $LINGUAS"
91 for b
in $ALL_LINGUAS; do
92 if test "$b" = "$i"; then
97 if test "$ok" = "0"; then
99 echo "$i is not a supported locale"
104 if [ "$MB" = "" -a "$i" = "ja" -o "$i" = "kr" ]; then
106 echo "A language you selected needs multi-byte character support"
107 echo "Do you want to enable it?"
110 if [ "$MB" = "y" -o "$MB" = "Y" ]; then
111 OPTIONS
="$OPTIONS --enable-kanji"
116 echo "Where do you want to put the message files? [$NLSDIR]"
119 if test "x$foo" != "x"; then
123 ##################### Installation path
126 while [ $done = 0 ]; do
128 echo "Where do you want to install Window Maker? [$PREFIX]"
129 echo "Don't change it if you don't know what you're doing."
130 if test $USER != root
; then
131 echo "Make sure to specify a path where you have write permission."
133 echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
136 if test "x$foo" != "x"; then
137 if [ "$foo" = "y" -o "$foo" = "n" ]; then
139 echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
149 echo "$PREFIX/bin must be in the PATH environment variable of all users who use Window Maker"
153 OPTIONS
="$OPTIONS --prefix=$PREFIX"
157 ##################### Configure
158 echo "--------------------------"
159 echo "Configuring Window Maker..."
160 echo "--------------------------"
161 if [ `uname -s` = "SCO_SV" ]; then
162 echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
164 CFLAGS
="$CFLAGS -belf -DANSICPP"
166 perform .
/configure
$OPTIONS
168 echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
170 CFLAGS
="$CFLAGS $GCCFLAGS"
172 perform .
/configure
$OPTIONS
176 #################### Compile
177 echo "-------------------------"
178 echo "Compiling Window Maker..."
179 echo "-------------------------"
180 (cd src
; perform
make clean
)
183 echo "--------------------------"
184 echo "Installing Window Maker..."
185 echo "--------------------------"
190 echo "Installation Finished!"
192 echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
193 echo "script that was just installed."
196 if test "$NLS" = "Y"; then
197 echo "Don't forget to set the LANG environment variable to your locale"