forked from katmagic/Shallot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure
executable file
·28 lines (23 loc) · 863 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
#!/bin/sh
cfg_path=src/config.h
>$cfg_path echo "#ifndef CONFIG_H"
>>$cfg_path echo "#define CONFIG_H"
if [ `uname -s | grep -i bsd` ]; then
echo "BSD detected! Good job..."
>>$cfg_path echo "#define BSD"
elif [ `uname -s | grep -i linux` ]; then
echo "Liunx detected. Have you considered switching to BSD?"
>>$cfg_path echo "#define LINUX_PORT"
elif [ `uname -s | grep -i darwin` ]; then
echo "OS X detected. Who needs a GUI anyway?"
>>$cfg_path echo "#define BSD"
>>$cfg_path echo "#define OSX"
else
echo "Unable to determine OS. Configuring for a generic build..."
>>$cfg_path echo "#define GENERIC"
fi
>>$cfg_path echo "#define _GNU_SOURCE"
>>$cfg_path echo "#endif"
echo "Configuration successful. This does not mean it will build."
echo "If you are missing gcc, or required libraries/headers, you"
echo "will need to install them first."