-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
80 lines (64 loc) · 2.1 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
70
71
72
73
74
75
76
77
78
79
80
AC_INIT([libason], [0.1.3], [casey.dahlin@gmail.com])
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign
parallel-tests subdir-objects])
AM_EXTRA_RECURSIVE_TARGETS([valgrind])
AM_SILENT_RULES([yes])
AC_PROG_CC
m4_pattern_allow([AM_PROG_AR])
AM_PROG_AR
AC_PROG_LN_S
AC_ARG_ENABLE([lcov], [AS_HELP_STRING(
[--enable-lcov],
[Compile in lcov support])
], [], [enable_lcov=no])
lcov_CFLAGS=
AC_PATH_PROG([LCOV], [lcov], [no])
AC_PATH_PROG([GENHTML], [genhtml], [no])
AS_IF([test "x$enable_lcov" = xyes], [
lcov_CFLAGS="-O0 -fprofile-arcs -ftest-coverage"
], [])
AC_ARG_VAR([lcov_CFLAGS], [C compiler flags for lcov])
test "x$LCOV" = "xno" -a "x$enable_lcov" = xyes && \
AC_MSG_ERROR([lcov command not found])
test "x$GENHTML" = "xno" -a "x$enable_lcov" = xyes && \
AC_MSG_ERROR([genhtml command (part of lcov) not found])
AC_ARG_WITH([asonq], [AS_HELP_STRING(
[--without-asonq],
[Build the asonq binary])
], [], [with_asonq=yes])
readline_LIBS=
readline_CFLAGS=
AS_IF([test "x$with_asonq" != xno], [
AC_CHECK_LIB([readline], [readline], [
readline_LIBS=-lreadline
], [
AC_MSG_FAILURE([--with-asonq requires readline])
])
])
AC_ARG_VAR([readline_CFLAGS], [C compiler flags for readline])
AC_ARG_VAR([readline_LIBS], [linker flags for readline])
AM_CONDITIONAL([BUILD_ASONQ], [ test "x$with_asonq" != xno ])
AC_PATH_PROG([LEMON], [lemon], [no])
test "x$LEMON" = "xno" && AC_MSG_ERROR([Lemon parser generator not found])
AC_ARG_ENABLE([spec], [AS_HELP_STRING(
[--enable-spec],
[Build the ASON specification document])
], [], [enable_spec=no])
AC_PATH_PROG([PDFLATEX], [pdflatex], [no])
test "x$PDFLATEX" = "xno" -a "x$enable_spec" = xyes && \
AC_MSG_ERROR([PDFLatex not found])
AC_PATH_PROG([VALGRIND], [valgrind], [no])
AM_CONDITIONAL([INSTALL_SPEC], [ test "x$enable_spec" = xyes ])
AC_ARG_VAR([LEMON], [Lemon parser generator command])
AC_ARG_VAR([PDFLATEX], [PDFLatex command])
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
include/Makefile
tests/Makefile
doc/Makefile
])
AC_OUTPUT