-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
59 lines (44 loc) · 1.17 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
## configure.ac -- Process this file with autoconf to produce configure
AC_INIT([moto-design generators],
[m4_esyscmd_s([./version.sh])],
[https://github.com/moto-design],
[],
[https://github.com/moto-design])
AC_CONFIG_MACRO_DIR([m4])
AC_PREFIX_DEFAULT([/usr/local])
AS_IF([test "x$CFLAGS" = "x"], [AC_SUBST([CFLAGS], [""])])
AC_PROG_CC
AM_INIT_AUTOMAKE
AC_GNU_SOURCE
LT_INIT
AM_SILENT_RULES([yes])
default_cflags="--std=gnu99 -g \
-Wall -W -Wunused -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wredundant-decls -Werror"
default_cppflags=""
AC_ARG_ENABLE(
[debug],
[AS_HELP_STRING([--enable-debug],
[build programs with extra debug info [default=no]]
)],
[],
[enable_debug=check]
)
AS_IF(
[test "x$enable_debug" = "xyes"],
[
default_cflags="$default_cflags -O0"
default_cppflags="$default_cppflags -DDEBUG"
],
[
default_cflags="$default_cflags -O2"
default_cppflags="$default_cppflags -DNDEBUG"
]
)
AC_SUBST([DEFAULT_CFLAGS], ["$default_cflags"])
AC_SUBST([DEFAULT_CPPFLAGS], ["$default_cppflags"])
AC_SUBST([LIBTOOL_DEPS])
AC_SUBST([DESTDIR])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([lib/Makefile] [Makefile])
AC_OUTPUT