-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
63 lines (52 loc) · 1.38 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
dnl SPDX-License-Identifier: GPL-2.0-only
dnl SPDX-FileCopyrightText: EfficiOS Inc.
AC_INIT([argpar], [0.1.0])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([foreign])
LT_INIT
AC_CONFIG_MACRO_DIRS([m4])
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
# Depend on glib just for the tests.
PKG_CHECK_MODULES([GLIB], [glib-2.0])
# When given, add -Werror to WARN_CFLAGS and WARN_CXXFLAGS.
# Disabled by default
AE_FEATURE_DEFAULT_DISABLE
AE_FEATURE([Werror],[Treat compiler warnings as errors.])
# Detect warning flags supported by the C compiler and append them to
# WARN_CFLAGS.
#
m4_define([WARN_FLAGS_LIST], [ dnl
-Wall dnl
-Wextra dnl
-Wmissing-prototypes dnl
-Wmissing-declarations dnl
-Wnull-dereference dnl
-Wundef dnl
-Wredundant-decls dnl
-Wshadow dnl
-Wjump-misses-init dnl
-Wsuggest-attribute=format dnl
-Wtautological-constant-out-of-range-compare dnl
-Wnested-externs dnl
-Wwrite-strings dnl
-Wformat=2 dnl
-Wstrict-aliasing dnl
-Wmissing-noreturn dnl
-Winit-self dnl
-Wduplicated-cond dnl
-Wduplicated-branches dnl
-Wlogical-op dnl
])
AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CFLAGS], [-Werror])
AE_IF_FEATURE_ENABLED([Werror], [WARN_CFLAGS="${WARN_CFLAGS} -Werror"])
AM_CFLAGS="${AM_CFLAGS} ${WARN_CFLAGS}"
AC_SUBST(AM_CFLAGS)
AC_CONFIG_FILES([
Doxyfile
Makefile
argpar/Makefile
tests/Makefile
tests/tap/Makefile
])
AC_OUTPUT