forked from keplerproject/orbit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·40 lines (33 loc) · 838 Bytes
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
if [ $1 == "--help" ]; then
echo "Usage: configure lua51"
echo "where lua51 is the name of your Lua executable"
exit 0
fi
echo "Trying to find where you installed Lua..."
if [ $1 != "" ]; then
lua=$1
else
lua="lua51"
fi
lua_bin=`which $lua`
lua_bin_dir=`dirname $lua_bin`
lua_root=`dirname $lua_bin_dir`
if [ $lua_root != "" ]; then
echo "Lua is in $lua_root"
echo "Writing config"
lua_share=$lua_root/share/lua/5.1
lua_lib=$lua_root/lib/lua/5.1
bin_dir=$lua_root/bin
echo "LUA_DIR= $lua_share" > config
echo "BIN_DIR= $bin_dir" >> config
echo "LUA_LIBDIR= $lua_lib" >> config
echo "Now run 'make && sudo make install'"
else
echo "Lua not found, please install Lua 5.1 (and put in your PATH)"
fi
if [ -f ./wsapi/configure ]; then
echo "Configuring wsapi..."
cd wsapi
./configure $1
fi