-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
81 lines (69 loc) · 1.88 KB
/
configure.in
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
81
#
# Copyright (C) 2017-2020, Thomas Maier-Komor
#
# This source file belongs to Wire-Format-Compiler.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
AC_INIT([Wire Format Compiler],ignored,thomas@maier-komor.de,wfc)
AC_CONFIG_SRCDIR([src/wfc.cc])
AC_LANG([C++])
AC_CANONICAL_SYSTEM
AC_EXEEXT
AC_PREFIX_DEFAULT(/usr/local)
test "$prefix" = NONE && prefix=/usr/local
test "$exec_prefix" = NONE && exec_prefix=$prefix
AC_LANG_C
AC_PROG_CC(gcc clang cc)
AC_PROG_CXX(g++ clang++ c++)
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_PROG_INSTALL
AC_PATH_PROG(YACC,bison)
AC_PATH_PROG(LEX,flex)
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(MV,mv)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(MKDIR,mkdir)
AC_PATH_PROG(SED,sed)
AC_PATH_PROG(DIFF,diff)
AC_PATH_PROG(HG,hg)
AC_PATH_PROG(XXD,xxd)
AC_ARG_ENABLE(beta,
AS_HELP_STRING([--enable-beta],[enable beta features]),
[enable_beta=yes],
)
if test x$enable_beta = xyes ; then
echo enabling beta features
AC_SUBST(BETA,[-DBETA_FEATURES])
else
AC_SUBST(BETA,"")
fi
$YACC -V | grep "(GNU Bison) 3." > /dev/null
if test x$? = x0 ; then
echo checking bison version... OK
else
echo GNU bison version 3.x required
exit 1
fi
if test "x$XXD" = "x" ; then
echo xxd not found
exit 1
fi
AC_SUBST(DEBUG)
AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(prefix)
AC_OUTPUT(Makefile)
# vim:tw=0