-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·36 lines (36 loc) · 1.35 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
if test -e endian.c; then rm endian.c; fi;
echo "int main(){ int a = 1; return *((char*)&a);}" >> endian.c
gcc endian.c -o endian
./endian
if [ "$?" != "1" ]; then echo "can only output raw data since you have a big endian machine";
make BMETRO CFLAGS= " -Draw"
else
if test -e /opt/homebrew #is homebrew installed?
then
if test -e ./bmetro #delete BMETRO if it exists (so as to force make with CFLAGS)
then
rm bmetro
fi
make sox && make BMETRO CFLAGS=" -Dbrew"
elif test -e /usr/local/Homebrew #alternative location
then
if test -e ./bmetro
then
rm bmetro
fi
make sox && make BMETRO CFLAGS=" -Dbrew"
else
echo #############################################################
echo #############################################################
echo Please consider installing Homebrew and rerunning ./configure.
echo Of course BMETRO will still work without it, though.
echo "i.e. check out https://brew.sh/"
echo #############################################################
echo "(If Homebrew is installed, but for some reason I haven't found it)"
echo "(Please run "'" rm bmetro && make BMETRO CFLAGS=" -Dbrew""'")"
echo #############################################################
echo #############################################################
make BMETRO
fi;
fi;
rm endian && rm endian.c