summaryrefslogtreecommitdiff
blob: c50c6c6c0ffeb5819051ce86b82a79d480b7ed6d (plain)
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
From a27139cd27aae3392c7b8e8bdeed0db50f0f2503 Mon Sep 17 00:00:00 2001
From: Alexandr Dubovikov <alexandr.dubovikov@gmail.com>
Date: Mon, 17 May 2021 14:34:23 +0200
Subject: [PATCH] fixed disable/enable conditions

---
 configure.ac | 112 +++++++++++++++++++++++----------------------------
 1 file changed, 50 insertions(+), 62 deletions(-)

diff --git a/configure.ac b/configure.ac
index 67be26c..85789bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.61)
-AC_INIT(captagent,6.3.0,support@sipcapture.org,,[http://www.sipcapture.org])
+AC_INIT(captagent,6.3.1,support@sipcapture.org,,[http://www.sipcapture.org])
 AC_COPYRIGHT("SIP Capture Solution")
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE(foreign tar-ustar)
@@ -28,67 +28,63 @@ AC_DEFINE_UNQUOTED(AGENT_PLAN_DIR, ["$agent_plan_dir"], [capture plans dir])
 AC_DEFINE_UNQUOTED(MODULE_DIR, ["$module_dir"], [directory that modules will be installed to])
 
 enableCompression=no
-AC_ARG_ENABLE(compression,
-   [  --enable-compression	Enable compression support)],
-   [ZLIB="$enableval"]
-   enableCompression=yes,
-   [ZLIB="no"]
-)
+AC_ARG_ENABLE([compression], AS_HELP_STRING([--enable-compression],[Enable compression support]))
+AS_IF([test "x$enable_compression" = "xyes"], [
+        enableCompression=yes
+        AC_DEFINE([ZLIB], [1], [Enable compression support])
+])
 AC_MSG_RESULT([$ZLIB])
 AC_SUBST([ZLIB])
 
 AC_MSG_CHECKING([whether to use ssl])
+
 enableSSL=no
-AC_ARG_ENABLE(ssl,
-   [  --enable-ssl	Enable SSL support],
-   [SSL="$enableval"]
-   enableSSL=yes,
-   [SSL="no"]
-)
+AC_ARG_ENABLE([ssl], AS_HELP_STRING([--enable-ssl],[Enable SSL support]))
+AS_IF([test "x$enable_ssl" = "xyes"], [
+        enableSSL=yes
+        AC_DEFINE([SSL], [1], [Enable SSL support])
+])
 AC_MSG_RESULT([$SSL])
 AC_SUBST([SSL])
 
 useMysql=no
 AC_MSG_CHECKING([whether to use mysql])
-AC_ARG_ENABLE(mysql,
-   [  --enable-mysql    Enable mysql support],
-   [MYSQL="$enableval"]
-   useMysql=yes,
-   [MYSQL="no"]
-)
+AC_ARG_ENABLE([mysql], AS_HELP_STRING([--enable-mysql],[Enable MySQL support]))
+AS_IF([test "x$enable_mysql" = "xyes"], [
+        useMysql=yes
+        AC_DEFINE([MYSQL], [1], [Enable MySQL support])
+])
 AC_MSG_RESULT([$MYSQL])
 AC_SUBST([MYSQL])
 
 useEpan=no
-AC_ARG_ENABLE(epan,
-   [  --enable-epan	Enable EPAN support / Wireshark dissectors)],
-   [EPAN="$enableval"]
-   useEpan=yes,
-   [EPAN="no"]
-)
+AC_ARG_ENABLE([epan], AS_HELP_STRING([--enable-epan],[Enable EPAN support / Wireshark dissectors]))
+AS_IF([test "x$enable_epan" = "xyes"], [
+        useEpan=yes
+        AC_DEFINE([EPAN], [1], [Enable epan support])
+])
 AC_MSG_RESULT([$EPAN])
 AC_SUBST([EPAN])
 
 
 usePCRE=no
 AC_MSG_CHECKING([whether to use pcre])
-AC_ARG_ENABLE(pcre,
-   [  --enable-pcre    Enable pcre support],
-   [PCRE="$enableval"]
-   usePCRE=yes,
-   [PCRE="no"]
-)
+AC_ARG_ENABLE([pcre], AS_HELP_STRING([--enable-pcre],[Enable pcre support]))
+AS_IF([test "x$enable_pcre" = "xyes"], [
+        usePCRE=yes
+	AC_DEFINE([PCRE], [1], [Enable pcre support])
+])
 AC_MSG_RESULT([$PCRE])
 AC_SUBST([PCRE])
 
 useRedis=no
 AC_MSG_CHECKING([whether to use redis])
-AC_ARG_ENABLE(redis,
-   [  --enable-redis    Enable redis support],
-   [REDIS="$enableval"]
-   useRedis=yes,
-   [REDIS="no"]
-)
+AC_ARG_ENABLE([redis], AS_HELP_STRING([--enable-redis],[Enable redis support]))
+AS_IF([test "x$enable_redis" = "xyes"], [
+        useRedis=yes
+	AC_DEFINE([REDIS], [1], [Enable redis])
+])
+
 AC_MSG_RESULT([$REDIS])
 AC_SUBST([REDIS])
 
@@ -98,22 +94,20 @@ AC_SUBST([LIBUV])
 
 useTLS=no
 AC_MSG_CHECKING([whether to use TLS])
-AC_ARG_ENABLE(tls,
-   [  --enable-tls    Enable TLS support],
-   [TLS="$enableval"]
-   useTLS=yes,
-   [TLS="no"]
-)
+AC_ARG_ENABLE([tls], AS_HELP_STRING([--enable-tls],[Enable TLS support]))
+AS_IF([test "x$enable_tls" = "xyes"], [
+        useTLS=yes
+	AC_DEFINE([TLS], [1], [Enable tls])
+])
 AC_MSG_RESULT([$TLS])
 AC_SUBST([TLS])
 
 enableExtraModules=no
-AC_ARG_ENABLE(extramodules,
-   [  --enable-extramodules	Enable extra modules],
-   [EXTRAMODULES="$enableval"]
-   enableExtraModules=yes,
-   [EXTRAMODULES="no"]
-)
+AC_ARG_ENABLE([extramodules], AS_HELP_STRING([--enable-extramodules],[Enable extra modules]))
+AS_IF([test "x$enable_extramodules" = "xyes"], [
+        enableExtraModules=yes
+        AC_DEFINE([EXTRAMODULES], [1], [Enable extra modules support])
+])
 AC_MSG_RESULT([$EXTRAMODULES])
 AC_SUBST([EXTRAMODULES])
 
@@ -330,20 +324,14 @@ dnl
 dnl IPv6 (and ICMPv6) support
 dnl
 
-AC_ARG_ENABLE(ipv6,
-[  --enable-ipv6                enable IPv6 (and ICMPv6) support],
-[
-  use_ipv6="$enableval"
-],
-[
-  use_ipv6="no"
+useIPv6=no
+AC_ARG_ENABLE([ipv6], AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]))
+AS_IF([test "x$enable_ipv6" = "xyes"], [
+        useIPv6=yes
+        AC_DEFINE([USE_IPv6], [1], [IPv6 (and ICMPv6) support])
+        AC_SUBST(USE_IPv6, yes)
 ])
 
-if test $use_ipv6 = yes; then
-   AC_DEFINE(USE_IPv6, [1], [IPv6 (and ICMPv6) support])
-   AC_SUBST(USE_IPv6, yes)
-fi
-
 
 # Checks for header files.
 AC_CHECK_HEADER(pcap.h,,[AC_MSG_ERROR([$PACKAGE_NAME cannot find pcap.h])])
@@ -388,7 +376,7 @@ echo
 echo Build directory............. : $captagent_builddir
 echo Installation prefix......... : $prefix
 echo HEP Compression............. : $enableCompression
-echo IPv6 support.................: $use_ipv6
+echo IPv6 support.................: $useIPv6
 echo HEP SSL/TLS................. : $enableSSL
 echo Flex........................ : ${LEX:-NONE}
 echo Bison....................... : ${YACC:-NONE}