-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
37 lines (28 loc) · 930 Bytes
/
configure.ac
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
AC_INIT(gambit, version-0.1)
AC_PROG_CC([gcc])
export LD_LIBRARY_PATH='/usr/local/include:/usr/local/lib:/c/MinGW/msys/1.0/local/include:/c/MinGW/msys/1.0/local/lib'
export CPPFLAGS='-I/usr/local/lib -I/usr/local/include -I/c/MinGW/msys/1.0/local/include'
AC_CHECK_PROG(GIT,[git],[yes],[no])
test "$GIT" == "no" && AC_MSG_ERROR([Required program 'git' not found.])
function require_cspec {
local install_attempted=$1
local libpresent=0
AC_CHECK_HEADERS(cspec.h, [libpresent=1], [libpresent=0])
AC_SEARCH_LIBS(cspec, [libpresent=1], [libpresent=0])
if test "$libpresent" == 1
then
return
fi
if test "$libpresent" == 0
then
AC_MSG_NOTICE([CSpec not found. Attempting to install CSpec])
mkdir .tmp
cd .tmp/
git clone https://github.com/arnaudbrejeon/cspec
cd cspec && ./autogen.sh && ./configure && make && make install
cd ..
cd ..
fi
}
require_cspec 0
AC_OUTPUT(Makefile)