-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
148 lines (123 loc) · 3.61 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# versioning
m4_define([libcc2540_major_version],[0])
m4_define([libcc2540_minor_version],[0])
m4_define([libcc2540_micro_version],[0])
m4_define([libcc2540_extra_version],[])
m4_define([libcc2540_version],[libcc2540_major_version.libcc2540_minor_version.libcc2540_micro_version()libcc2540_extra_version])
# API version
m4_define([libcc2540_api_version],[libcc2540_major_version.libcc2540_minor_version.libcc2540_micro_version()libcc2540_extra_version])
# Libtool versioning.
# Before making a release, the libtool version should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
# libtool version
m4_define([libcc2540_lt_current],[0])
m4_define([libcc2540_lt_revision],[0])
m4_define([libcc2540_lt_age],[0])
m4_define([libcc2540_lt_version_info],[libcc2540_lt_current:libcc2540_lt_revision:libcc2540_lt_age])
m4_define([libcc2540_lt_current_minus_age],[m4_eval(libcc2540_lt_current - libcc2540_lt_age)])
# binary version
m4_define([libcc2540_binary_version],[libcc2540_lt_current])
AC_PREREQ(2.60)
AC_INIT([libcc2540],
[libcc2540_version],
[inigomartinez@gmail.com],
[libcc2540],
[https://github.com/inigomartinez/liblibcc2540])
AC_COPYRIGHT([Copyright (C) 2016 Iñigo Martínez])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
AM_INIT_AUTOMAKE([
check-news
foreign
1.11
-Wall
-Wno-portability
silent-rules
tar-pax
no-dist-gzip
dist-xz
subdir-objects
])
AM_SILENT_RULES([yes])
LT_PREREQ([2.2.6])
LT_INIT([
disable-static
pic-only
])
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_CC_C99
AC_C_INLINE
# header support
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_ARG_ENABLE([test],
AS_HELP_STRING([--disable-test], [disable test building @<:@default=enabled@:>@]),
[], enable_test=yes)
AM_CONDITIONAL(ENABLE_TEST, test "x$enable_test" = "xyes")
AS_IF([test "x$enable_test" = "xyes"], [
AC_DEFINE(ENABLE_TEST, [1], [Test building.])
])
AC_ARG_ENABLE([doc],
AS_HELP_STRING([--disable-doc], [disable documentation building @<:@default=disabled@:>@]),
[], enable_doc=no)
AM_CONDITIONAL(ENABLE_DOC, test "x$enable_doc" = "xyes")
AS_IF([test "x$enable_doc" = "xyes"], [
AC_DEFINE(ENABLE_DOC, [1], [Documentation building.])
])
my_CFLAGS="\
-Wall \
-Wchar-subscripts \
-Wformat-security \
-Wmissing-declarations \
-Wmissing-prototypes \
-Wnested-externs \
-Wpointer-arith \
-Wshadow \
-Wsign-compare \
-Wstrict-prototypes \
-Wtype-limits \
-pedantic
"
AC_SUBST([my_CFLAGS])
# versioning
AC_SUBST([LIBCC2540_MAJOR_VERSION],[libcc2540_major_version])
AC_SUBST([LIBCC2540_MINOR_VERSION],[libcc2540_minor_version])
AC_SUBST([LIBCC2540_MICRO_VERSION],[libcc2540_micro_version])
AC_SUBST([LIBCC2540_VERSION],[libcc2540_version])
AC_SUBST([LIBCC2540_API_VERSION],[libcc2540_api_version])
AC_SUBST([LIBCC2540_BINARY_VERSION],[libcc2540_binary_version])
AC_SUBST([LIBCC2540_LT_VERSION_INFO],[libcc2540_lt_version_info])
# Silence warning: ar: 'u' modifier ignored since 'D' is the default
AC_SUBST(AR_FLAGS, [cr])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([
Makefile
src/Makefile
test/Makefile
doc/Makefile
libcc2540.pc
])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION
=====
prefix: ${prefix}
sysconfdir: ${sysconfdir}
libdir: ${libdir}
includedir: ${includedir}
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
test: ${enable_test}
doc: ${enable_doc}
])