-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·112 lines (97 loc) · 2.94 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/bash
#MINGW USERS:
#To make this script work under MinGW, change the
#top line to point to this: #!/bin/sh
#Make the non-argument config be Dead Souls
if ! [ $1 ]; then
ARG="h"
else
ARG=$1
fi
if [ $ARG == "--help" ] || [ $ARG == "-h" ]; then
echo "Available options:"
echo "A generic build: ./configure generic"
echo "For Dead Souls 2: ./configure ds"
echo "For Sapidlib: ./configure sapid"
echo "For Discworld: ./configure dw"
echo "For Lima: ./configure lima"
echo "For Skylib: ./configure skylib"
echo "For TMI-2: ./configure tmi2"
echo "For Merentha: ./configure merentha"
echo "For Nightmare 3: ./configure nm3"
echo "For LPUniversity: ./configure lpuni"
echo "For Lil: ./configure lil"
echo "For Final Realms: ./configure fr"
echo "For Foundation I: ./configure foundation"
echo "For Foundation II:./configure foundation2"
echo "For Nightmare IV: ./configure nm4"
echo "----"
echo "With no options, this script defaults to local_options.h."
exit
fi
echo "Option selected: $ARG $2"
sleep 1
./build.FluffOS $2
#if [ $ARG == "ds" ] || [ $ARG == "ds.debug" ]; then
#\cp -f ../extra/creremote/remote.c ../lib/lib/
#fi
if uname -a | grep -i "cygwin" | grep -v grep ; then
echo "Cygwin detected."
export WINDOWS='#define WINDOWS'
else
# Some stuff for Dead Souls not on Cygwin
if [ $ARG == "ds" ] || [ $ARG == "ds.debug" ]; then
echo "Moving around some DS specific files..."
# if ! [ -f ../bin/mudos.bak ]; then
# \rm -f ../bin/mudos.bak
# \mv -f ../bin/mudos.cfg ../bin/mudos.bak
# \cp -f ../bin/mudos.cfg.orig ../lib/secure/cfg/mudos.cfg
# ln -s ../lib/secure/cfg/mudos.cfg ../bin/mudos.cfg
# echo "File moves done"
# fi
fi
fi
#start local_options check
if [ -f local_options.$ARG ]; then
if ! [ -f local_options ]; then
echo "Copying local_options.$ARG to local_options"
cp local_options.$ARG local_options
else
echo "local_options already exists. Not overwriting. Exiting."
echo "If you want to completely start over, type: make distclean"
exit
fi
else
echo "local_options.$ARG not found. Exiting."
fi
#end local_options check
if uname -a | grep "MINGW" | grep -v grep ; then
echo "MinGW detected. Adding appropriate config"
#echo " -lwsock32 -lws2_32 -lz" > system_libs
#\cp -f ../extra/mingw/configur* .
export WINDOWS='#define WINDOWS'
echo "#define MINGW" >> local_options
echo "#undef HAS_CONSOLE" >> local_options
else
echo "No MinGW config needed."
fi
if /sbin/ifconfig -a | grep "204\.209\.44" | grep -v grep ; then
echo "Wolfpaw detected."
echo "Running Wolfpaw-specific modification."
echo "When this is done, please enter the following command line:"
echo "*********"
echo " "
echo "make -j 1"
echo " "
echo "*********"
cp -f ../extra/wolfpaw/* .
echo "#include \"../extra/wolfpaw/configure.h\"" >> local_options
else
echo "No Wolfpaw config needed."
fi
#This will be blank if there is no Cygwin or MinGW:
echo $WINDOWS >> local_options
ulimit -n 2048
export ULIMIT=`ulimit -n`
echo "#define ULIMIT "$ULIMIT >> local_options
echo "Configuration script complete."