-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
69 lines (56 loc) · 1.47 KB
/
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
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
AC_INIT(Eagle, 0.6.0, [email protected])
AC_PROG_CC
AC_PROG_CXX
AC_SUBST(stuff, hello)
AC_PROG_LEX
AC_PROG_YACC
AC_CHECK_PROGS([llvmconfig], [llvm-config llvm-config-3.5 llvm-config-3.6 llvm-config-3.7], no, $PATH)
AC_CHECK_PROG(PYTHON, python, "yes")
AC_CHECK_HEADER(pthread.h, have_pthread="yes")
if test "$have_pthread" == "yes"
then
AC_MSG_NOTICE([Using pthreads])
AC_SUBST(haspthreads, "HAS_PTHREAD")
else
AC_MSG_NOTICE([No pthread support])
AC_SUBST(haspthreads, "NO_PTHREAD")
fi
AC_ARG_ENABLE(debug, [--enable-debug enable debug mode])
AC_ARG_WITH(llvm-config, [--with-llvm-config set the llvm-config program], llvmconfprog=$withval, llvmconfprog="no")
if test "$enable_debug" == "yes"
then
AC_MSG_NOTICE([Debug mode is enabled])
AC_SUBST(targ, "-O0 -g")
AC_SUBST(debug, "DEBUG")
else
AC_SUBST(targ, -O3)
AC_SUBST(debug, "RELEASE")
fi
if test $llvmconfig == "no"
then
AC_MSG_ERROR([llvm-config missing])
fi
if ! $LEX --version
then
AC_MSG_ERROR([lexer missing])
fi
if ! $YACC --version
then
AC_MSG_ERROR([parser generator missing])
fi
if test `llvm-config --version | awk -F "." '{print $2}'` == "7"
then
AC_SUBST(llvmvsn, llvm_NEW)
else
AC_SUBST(llvmvsn, [llvm_OLD])
fi
if test $PYTHON == "no"
then
AC_MSG_ERROR([python missing])
fi
python linequoter.py > rc.egl.out
AC_SUBST(configcode, `cat rc.egl.out`)
rm -rf rc.egl.out
AC_OUTPUT(Makefile)
AC_OUTPUT(src/core/config.h)
AC_OUTPUT(src/core/config.c)