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
|
AC_INIT([aplwc], [0.0.1], [peter@pmikkelsen.com], [aplwc], [aplwc.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign posix subdir-objects])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([disable])
AC_CONFIG_SRCDIR([src/bin/main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIRS([m4])
AC_PROG_CC
AX_PROG_CC_FOR_BUILD
AC_C_FLEXIBLE_ARRAY_MEMBER
AM_PROG_AR
LT_INIT
AC_ARG_ENABLE([build-mode],
[AS_HELP_STRING([--enable-build-mode=MODE],
[select build mode: debug, release or coverage (default: release)])],
[AS_CASE([$enableval],
[debug], [build_mode="debug"],
[release], [build_mode="release"],
[coverage], [build_mode="coverage"],
[AC_MSG_ERROR([Invalid value for --enable-build-mode: $enableval])])],
[build_mode="release"])
AC_MSG_CHECKING([build mode])
AC_MSG_RESULT([$build_mode])
AS_CASE([$build_mode],
[debug], [AC_DEFINE([APLWC_BUILD_TYPE_DEBUG], [1], [Defined if the build mode is "debug"])],
[release], [AC_DEFINE([APLWC_BUILD_TYPE_RELEASE], [1], [Defined if the build mode is "release"])],
[coverage], [
AC_DEFINE([APLWC_BUILD_TYPE_COVERAGE], [1], [Defined if the build mode is "coverage"]),
AC_DEFINE([NDEBUG], [1], [Defined if the build mode is "coverage", to disable asserts])
]
)
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT
|