File: configure

package info (click to toggle)
lua-orbit 2.2.1%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,960 kB
  • sloc: javascript: 2,216; sql: 78; sh: 32; makefile: 31; xml: 20
file content (40 lines) | stat: -rwxr-xr-x 838 bytes parent folder | download | duplicates (5)
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