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 ######################## KDE
129 echo "Do you want KDE support?"
132 if [ "$kde" = y
-o "$kde" = Y
]; then
133 OPTIONS
="$OPTIONS --enable-kde"
136 ######################## GNOME
138 echo "Do you want GNOME support?"
141 if [ "$gnome" = y
-o "$gnome" = Y
]; then
142 OPTIONS
="$OPTIONS --enable-gnome"
145 ######################## OLWM
147 echo "Do you want OPEN LOOK(tm)/olwm support?"
150 if [ "$olwm" = y
-o "$olwm" = Y
]; then
151 OPTIONS
="$OPTIONS --enable-openlook"
154 ######################## NLS
156 echo "Do you want National Language Support?"
160 if [ "$NLS" = "y" -o "$NLS" = "Y" ]; then
162 echo "The supported locales are:"
163 ling
=` (cd po; /bin/ls *.po) `
166 lname
=`(cd po; grep Language-Team $l|cut -f2- -d:|cut -f1 -d\\\\|cut -f1 -d\<)`
168 lcode
=`basename $l .po`
169 ALL_LINGUAS
="$ALL_LINGUAS $lcode"
172 echo "Type in the locales you want (all will install everything) [none]"
174 if test "$foo" = "all"; then
175 LINGUAS
="$ALL_LINGUAS"
179 echo "Selected locales are: $LINGUAS"
182 for i
in $LINGUAS; do
184 for b
in $ALL_LINGUAS; do
185 if test "$b" = "$i"; then
190 if test "$ok" = "0"; then
192 echo "$i is not a supported locale"
199 echo "Where do you want to put the message files? [$NLSDIR]"
202 if test "x$foo" != "x"; then
206 ##################### Installation path
209 while [ $done = 0 ]; do
211 echo "Where do you want to install Window Maker? [$PREFIX]"
212 echo "Don't change it if you don't know what you're doing."
213 if test "$USER" != "root"; then
214 echo "Make sure to specify a path where you have write permission."
216 echo "(The default will put Window Maker in $PREFIX/bin, $PREFIX/lib etc.)"
219 if test "x$foo" != "x"; then
220 if [ "$foo" = "y" -o "$foo" = "n" ]; then
222 echo "Hmm... I don't think you really want to install Window Maker into \"$foo\""
232 echo " $PREFIX/bin must be in the PATH environment variable"
233 echo "of all users who will use Window Maker"
237 OPTIONS
="$OPTIONS --prefix=$PREFIX"
240 ##################### Install stripped binaries?
243 echo "Do you want stripped binaries to be installed?"
244 echo "Installed binaries will be smaller (with debug info removed)."
247 if [ "$foo" = y
-o "$foo" = Y
]; then
248 INSTALL
="install-strip"
252 ##################### Configure
253 echo "--------------------------"
254 echo "Configuring Window Maker..."
255 echo "--------------------------"
256 if [ `uname -s` = "SCO_SV" ]; then
257 echo "CFLAGS=\"$CFLAGS -belf -DANSICPP\" ./configure $OPTIONS"
259 CFLAGS
="$CFLAGS -belf -DANSICPP"
261 perform .
/configure
$OPTIONS
263 echo "CFLAGS=\"$CFLAGS $GCCFLAGS\" ./configure $OPTIONS"
265 CFLAGS
="$CFLAGS $GCCFLAGS"
267 perform .
/configure
$OPTIONS
271 #################### Compile
272 echo "-------------------------"
273 echo "Compiling Window Maker..."
274 echo "-------------------------"
275 (cd src
; perform
make $MAKE_OPTIONS clean
)
276 perform
make $MAKE_OPTIONS
278 echo "--------------------------"
279 echo "Installing Window Maker..."
280 echo "--------------------------"
282 perform
make $MAKE_OPTIONS $INSTALL
284 if [ `uname -s` = "Linux" ]; then
286 echo " Make sure $PREFIX/lib is in the /etc/ld.so.conf file"
291 echo "Installation Finished!"
293 echo "Now, each user that wishes to use WindowMaker must run the wmaker.inst"
294 echo "script that was just installed."
297 if test "$NLS" = "Y"; then
298 echo "Don't forget to set the LANG environment variable to your locale"