forked from OpenRA/OpenRA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·30 lines (29 loc) · 1.25 KB
/
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
#!/bin/bash
# Use Linux system dependencies where possible, but take into account different .so names.
os=`uname`
if [ "$os" == 'Linux' ]; then
locations=(/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/local/lib /opt/lib)
sonames=(liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so)
for location in "${locations[@]}" ; do
for soname in ${sonames[@]} ; do
if [ -f $location/$soname ]; then
liblua51=$soname
echo "Detected Lua 5.1 library at "$location/$soname
break 2
fi
done
done
if [ -z "$liblua51" ]; then
echo "Lua 5.1 library detection failed."
exit 1
else
sed "s/@LIBLUA51@/${liblua51}/" thirdparty/Eluant.dll.config.in > Eluant.dll.config
echo "Eluant.dll.config has been created successfully."
fi
elif [ "$os" == 'Darwin' ]; then
echo "Downloading pre-compiled lua and SDL2 libraries"
curl -O https://raw.githubusercontent.com/OpenRA/OpenRALauncherOSX/master/dependencies/Eluant.dll.config
curl -O https://raw.githubusercontent.com/OpenRA/OpenRALauncherOSX/master/dependencies/liblua.5.1.dylib
curl -O https://raw.githubusercontent.com/OpenRA/OpenRALauncherOSX/master/dependencies/libSDL2.dylib
echo "Downloaded Lua 5.1 and SDL2 libraries successfully."
fi