8a94fee8d48be885261ae3c5bb2df0147fab57f6
[argpar.git] / configure.ac
1 dnl SPDX-License-Identifier: GPL-2.0-only
2 dnl SPDX-FileCopyrightText: EfficiOS Inc.
3
4 AC_INIT([argpar], [0.1.0])
5 AC_USE_SYSTEM_EXTENSIONS
6
7 AM_INIT_AUTOMAKE([foreign])
8 LT_INIT
9
10 AC_CONFIG_MACRO_DIRS([m4])
11
12 # Depend on glib just for the tests.
13 PKG_CHECK_MODULES([GLIB], [glib-2.0])
14
15 # When given, add -Werror to WARN_CFLAGS and WARN_CXXFLAGS.
16 # Disabled by default
17 AE_FEATURE_DEFAULT_DISABLE
18 AE_FEATURE([Werror],[Treat compiler warnings as errors.])
19
20 # Detect warning flags supported by the C compiler and append them to
21 # WARN_CFLAGS.
22 #
23 m4_define([WARN_FLAGS_LIST], [ dnl
24 -Wall dnl
25 -Wextra dnl
26 -Wmissing-prototypes dnl
27 -Wmissing-declarations dnl
28 -Wnull-dereference dnl
29 -Wundef dnl
30 -Wredundant-decls dnl
31 -Wshadow dnl
32 -Wjump-misses-init dnl
33 -Wsuggest-attribute=format dnl
34 -Wtautological-constant-out-of-range-compare dnl
35 -Wnested-externs dnl
36 -Wwrite-strings dnl
37 -Wformat=2 dnl
38 -Wstrict-aliasing dnl
39 -Wmissing-noreturn dnl
40 -Winit-self dnl
41 -Wduplicated-cond dnl
42 -Wduplicated-branches dnl
43 -Wlogical-op dnl
44 ])
45
46 AX_APPEND_COMPILE_FLAGS([WARN_FLAGS_LIST], [WARN_CFLAGS], [-Werror])
47 AE_IF_FEATURE_ENABLED([Werror], [WARN_CFLAGS="${WARN_CFLAGS} -Werror"])
48 AM_CFLAGS="${AM_CFLAGS} ${WARN_CFLAGS}"
49
50 AC_SUBST(AM_CFLAGS)
51
52 AC_CONFIG_FILES([
53 Doxyfile
54 Makefile
55 argpar/Makefile
56 tests/Makefile
57 tests/tap/Makefile
58 ])
59
60 AC_OUTPUT
This page took 0.032592 seconds and 5 git commands to generate.