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."
70 echo "Did you read the INSTALL file?"
73 if [ "$rtfm" != y
]; then
74 echo "Please read the INSTALL file before installing"
80 if [ "$rtfm" != y
]; then
81 echo "Please read the INSTALL file before installing"
87 if [ "$rtfm" != n
]; then
89 echo "Please read the INSTALL file before installing"
92 echo "Do you *swear* that you really read the INSTALL file?"
95 if [ "$rtfm" != y
]; then
96 echo "Please read the INSTALL file before installing"
99 echo "Last chance. You will not get help if you have some problem"
100 echo "because you didn't read that file. Even if your computer explodes."
101 echo "Do you *really* read it?"
104 if [ "$rtfm" != y
]; then
105 echo "Please read the INSTALL file before installing"
109 echo "Ok, you have been warned."
114 if test "$USER" != "root"; then
116 echo "Warning: you must run this script as root to install"
117 echo "Window Maker. Hit <Control>-<C> to quit this script."
124 echo "Option Selection"
125 echo "================"
127 ######################## NLS
129 echo "Do you want National Language Support?"
133 if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
135 echo "The supported locales are:"
136 ling
=` (cd po; /bin/ls *.po) `
139 lname
=`(cd po; grep Language-Team $l|cut -f2- -d:|cut -f1 -d\\\\|cut -f1 -d\<)`
141 lcode
=`basename $l .po`
142 ALL_LINGUAS
="$ALL_LINGUAS $lcode"
145 echo "Type in the locales you want (all will install everything) [none]"
147 if test "$foo" = "all"; then
148 LINGUAS
="$ALL_LINGUAS"
152 echo "Selected locales are: $LINGUAS"
155 for i
in $LINGUAS; do
157 for b
in $ALL_LINGUAS; do
158 if test "$b" = "$i"; then
163 if test "$ok" = "0"; then
165 echo "$i is not a supported locale"
172 echo "Where do you want to put the message files? [$NLSDIR]"
175 if test "x$foo" != "x"; then
179 ##################### Installation path
182 while [ $done = 0 ]; do
184 echo "Where do you want to install Window Maker? [$PREFIX]"
185 echo "Don't change it if you don't know what you're doing."
186 if test "$USER" != "root"; then
187 echo "Make sure to specify a path where you have write permission."
189 echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
192 if test "x$foo" != "x"; then
193 if [ "$foo" = "y" -o "$foo" = "n" ]; then
195 echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
205 echo " $PREFIX/bin must be in the PATH environment variable"
206 echo "of all users who will use Window Maker"
210 OPTIONS
="$OPTIONS --prefix=$PREFIX"
213 ##################### Install stripped binaries?
216 echo "Do you want stripped binaries to be installed?"
217 echo "Installed binaries will be smaller (with debug info removed)."
220 if [ "$foo" = y
-o "$foo" = Y
]; then
221 INSTALL
="install-strip"
225 ##################### Configure
226 echo "--------------------------"
227 echo "Configuring Window Maker..."
228 echo "--------------------------"
229 if [ `uname -s` = "SCO_SV" ]; then
230 echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
232 CFLAGS
="$CFLAGS -belf -DANSICPP"
234 perform .
/configure
$OPTIONS
236 echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
238 CFLAGS
="$CFLAGS $GCCFLAGS"
240 perform .
/configure
$OPTIONS
244 #################### Compile
245 echo "-------------------------"
246 echo "Compiling Window Maker..."
247 echo "-------------------------"
248 (cd src
; perform
make $MAKE_OPTIONS clean
)
249 perform
make $MAKE_OPTIONS
251 echo "--------------------------"
252 echo "Installing Window Maker..."
253 echo "--------------------------"
255 perform
make $MAKE_OPTIONS $INSTALL
257 if [ `uname -s` = "Linux" ]; then
259 echo " Make sure $PREFIX/lib is in the /etc/ld.so.conf file"
264 echo "Installation Finished!"
266 echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
267 echo "script that was just installed."
270 if test "$NLS" = "Y"; then
271 echo "Don't forget to set the LANG environment variable to your locale"