-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
50 lines (39 loc) · 898 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
38
39
40
41
42
43
44
45
46
47
48
49
50
AC_INIT(sancus-core, 0.0, [email protected])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign dist-bzip2 -Wall -Werror])
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
#
# Check for programs
#
AC_PROG_CC_C99
#
# Check for libraries
#
PKG_CHECK_MODULES(EV, [libev])
#
# Options
#
# --enable-debug
#
AC_MSG_CHECKING([wheter to build with debug information])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug], [enable debug data generation (def=almost)])],
[debugit="$enableval"],
[debugit=almost])
AC_MSG_RESULT([$debugit])
# CFLAGS
if test x"$debugit" = x"yes"; then
AC_DEFINE([DEBUG],[],[Debug Mode])
CFLAGS="-g -O0"
elif test x"$debugit" = x"no"; then
AC_DEFINE([NDEBUG],[],[No-debug Mode])
CFLAGS="-O3"
fi
CFLAGS="$CFLAGS -Wall -Wextra -pedantic -Winline"
AC_CONFIG_FILES([sancus-core.pc])
AC_CONFIG_FILES([Makefile
doc/Makefile
include/Makefile
src/Makefile])
AC_OUTPUT