]>
Commit | Line | Data |
---|---|---|
6fbf66fa JY |
1 | dnl OpenVPN -- An application to securely tunnel IP networks |
2 | dnl over a single UDP port, with support for SSL/TLS-based | |
3 | dnl session authentication and key exchange, | |
4 | dnl packet encryption, packet authentication, and | |
5 | dnl packet compression. | |
6 | dnl | |
564a2109 | 7 | dnl Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net> |
51bd56f4 | 8 | dnl Copyright (C) 2006-2012 Alon Bar-Lev <alon.barlev@gmail.com> |
6fbf66fa JY |
9 | dnl |
10 | dnl This program is free software; you can redistribute it and/or modify | |
11 | dnl it under the terms of the GNU General Public License as published by | |
12 | dnl the Free Software Foundation; either version 2 of the License, or | |
13 | dnl (at your option) any later version. | |
14 | dnl | |
15 | dnl This program is distributed in the hope that it will be useful, | |
16 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | dnl GNU General Public License for more details. | |
19 | dnl | |
20 | dnl You should have received a copy of the GNU General Public License | |
21 | dnl along with this program (see the file COPYING included with this | |
22 | dnl distribution); if not, write to the Free Software Foundation, Inc., | |
23 | dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 | ||
25 | dnl Process this file with autoconf to produce a configure script. | |
26 | ||
51bd56f4 | 27 | AC_PREREQ(2.59) |
6fbf66fa | 28 | |
ce351583 | 29 | m4_include(version.m4) |
51bd56f4 ABL |
30 | AC_INIT([PRODUCT_NAME], [PRODUCT_VERSION], [PRODUCT_BUGREPORT], [PRODUCT_TARNAME]) |
31 | m4_include(compat.m4) | |
98bc1a3e ABL |
32 | AC_DEFINE([OPENVPN_VERSION_RESOURCE], [PRODUCT_VERSION_RESOURCE], [Version in windows resource format]) |
33 | ||
51bd56f4 ABL |
34 | AC_CONFIG_AUX_DIR([.]) |
35 | AM_CONFIG_HEADER([config.h]) | |
34cb9132 | 36 | AC_CONFIG_SRCDIR([src/openvpn/syshead.h]) |
0fc5b8b3 | 37 | AC_CONFIG_MACRO_DIR([m4]) |
51bd56f4 ABL |
38 | AM_INIT_AUTOMAKE |
39 | AC_CANONICAL_HOST | |
40 | AC_USE_SYSTEM_EXTENSIONS | |
6fbf66fa | 41 | |
51bd56f4 ABL |
42 | AC_ARG_ENABLE( |
43 | [lzo], | |
709f7a1f | 44 | [AS_HELP_STRING([--enable-lzo], [enable LZO compression support @<:@default=no@:>@])], |
51bd56f4 | 45 | , |
74bbc71b | 46 | [enable_lzo="no"] |
6c34e74f JY |
47 | ) |
48 | ||
51bd56f4 ABL |
49 | AC_ARG_ENABLE( |
50 | [lzo-stub], | |
709f7a1f | 51 | [AS_HELP_STRING([--enable-lzo-stub], [don't compile LZO compression support but still allow limited interoperability with LZO-enabled peers @<:@default=no@:>@])], |
51bd56f4 ABL |
52 | , |
53 | [enable_lzo_stub="no"] | |
6fbf66fa JY |
54 | ) |
55 | ||
51bd56f4 ABL |
56 | AC_ARG_ENABLE( |
57 | [crypto], | |
709f7a1f | 58 | [AS_HELP_STRING([--disable-crypto], [disable crypto support @<:@default=yes@:>@])], |
51bd56f4 ABL |
59 | , |
60 | [enable_crypto="yes"] | |
6fbf66fa JY |
61 | ) |
62 | ||
51bd56f4 ABL |
63 | AC_ARG_ENABLE( |
64 | [ssl], | |
709f7a1f | 65 | [AS_HELP_STRING([--disable-ssl], [disable SSL support for TLS-based key exchange @<:@default=yes@:>@])], |
51bd56f4 ABL |
66 | , |
67 | [enable_ssl="yes"] | |
fbd18db6 DS |
68 | ) |
69 | ||
51bd56f4 ABL |
70 | AC_ARG_ENABLE( |
71 | [x509-alt-username], | |
709f7a1f | 72 | [AS_HELP_STRING([--enable-x509-alt-username], [enable the --x509-username-field feature @<:@default=no@:>@])], |
51bd56f4 ABL |
73 | , |
74 | [enable_x509_alt_username="no"] | |
6fbf66fa JY |
75 | ) |
76 | ||
51bd56f4 ABL |
77 | AC_ARG_ENABLE( |
78 | [multi], | |
709f7a1f | 79 | [AS_HELP_STRING([--disable-multi], [disable client/server support (--mode server + client mode) @<:@default=yes@:>@])], |
51bd56f4 ABL |
80 | , |
81 | [enable_multi="yes"] | |
6fbf66fa JY |
82 | ) |
83 | ||
51bd56f4 ABL |
84 | AC_ARG_ENABLE( |
85 | [server], | |
709f7a1f | 86 | [AS_HELP_STRING([--disable-server], [disable server support only (but retain client support) @<:@default=yes@:>@])], |
51bd56f4 ABL |
87 | , |
88 | [enable_server="yes"] | |
6fbf66fa JY |
89 | ) |
90 | ||
51bd56f4 ABL |
91 | AC_ARG_ENABLE( |
92 | [plugins], | |
709f7a1f | 93 | [AS_HELP_STRING([--disable-plugins], [disable plug-in support @<:@default=yes@:>@])], |
51bd56f4 ABL |
94 | , |
95 | [enable_plugins="yes"] | |
0c1f7ad5 DS |
96 | ) |
97 | ||
51bd56f4 ABL |
98 | AC_ARG_ENABLE( |
99 | [eurephia], | |
709f7a1f | 100 | [AS_HELP_STRING([--disable-eurephia], [disable support for the eurephia plug-in @<:@default=yes@:>@])], |
51bd56f4 ABL |
101 | , |
102 | [enable_eurephia="yes"] | |
6fbf66fa JY |
103 | ) |
104 | ||
51bd56f4 ABL |
105 | AC_ARG_ENABLE( |
106 | [management], | |
709f7a1f | 107 | [AS_HELP_STRING([--disable-management], [disable management server support @<:@default=yes@:>@])], |
51bd56f4 ABL |
108 | , |
109 | [enable_management="yes"] | |
ce98fd24 JY |
110 | ) |
111 | ||
51bd56f4 ABL |
112 | AC_ARG_ENABLE( |
113 | [pkcs11], | |
709f7a1f | 114 | [AS_HELP_STRING([--enable-pkcs11], [enable pkcs11 support @<:@default=no@:>@])], |
51bd56f4 | 115 | , |
18b5fbdf | 116 | [enable_pkcs11="no"] |
6fbf66fa JY |
117 | ) |
118 | ||
51bd56f4 ABL |
119 | AC_ARG_ENABLE( |
120 | [socks], | |
709f7a1f | 121 | [AS_HELP_STRING([--disable-socks], [disable Socks support @<:@default=yes@:>@])], |
51bd56f4 ABL |
122 | , |
123 | [enable_socks="yes"] | |
6fbf66fa JY |
124 | ) |
125 | ||
51bd56f4 ABL |
126 | AC_ARG_ENABLE( |
127 | [http-proxy], | |
709f7a1f | 128 | [AS_HELP_STRING([--disable-http-proxy], [disable HTTP proxy support @<:@default=yes@:>@])], |
51bd56f4 ABL |
129 | , |
130 | [enable_http_proxy="yes"] | |
6fbf66fa JY |
131 | ) |
132 | ||
51bd56f4 ABL |
133 | AC_ARG_ENABLE( |
134 | [fragment], | |
709f7a1f | 135 | [AS_HELP_STRING([--disable-fragment], [disable internal fragmentation support (--fragment) @<:@default=yes@:>@])], |
51bd56f4 ABL |
136 | , |
137 | [enable_fragment="yes"] | |
8bc93d7f JY |
138 | ) |
139 | ||
51bd56f4 ABL |
140 | AC_ARG_ENABLE( |
141 | [multihome], | |
709f7a1f | 142 | [AS_HELP_STRING([--disable-multihome], [disable multi-homed UDP server support (--multihome) @<:@default=yes@:>@])], |
51bd56f4 ABL |
143 | , |
144 | [enable_multihome="yes"] | |
6add6b2f JY |
145 | ) |
146 | ||
51bd56f4 ABL |
147 | AC_ARG_ENABLE( |
148 | [port-share], | |
709f7a1f | 149 | [AS_HELP_STRING([--disable-port-share], [disable TCP server port-share support (--port-share) @<:@default=yes@:>@])], |
51bd56f4 ABL |
150 | , |
151 | [enable_port_share="yes"] | |
6fbf66fa JY |
152 | ) |
153 | ||
51bd56f4 ABL |
154 | AC_ARG_ENABLE( |
155 | [debug], | |
709f7a1f | 156 | [AS_HELP_STRING([--disable-debug], [disable debugging support (disable gremlin and verb 7+ messages) @<:@default=yes@:>@])], |
51bd56f4 ABL |
157 | , |
158 | [enable_debug="yes"] | |
6fbf66fa JY |
159 | ) |
160 | ||
51bd56f4 ABL |
161 | AC_ARG_ENABLE( |
162 | [small], | |
709f7a1f | 163 | [AS_HELP_STRING([--enable-small], [enable smaller executable size (disable OCC, usage message, and verb 4 parm list) @<:@default=yes@:>@])], |
51bd56f4 ABL |
164 | , |
165 | [enable_small="no"] | |
6fbf66fa JY |
166 | ) |
167 | ||
51bd56f4 ABL |
168 | AC_ARG_ENABLE( |
169 | [password-save], | |
709f7a1f | 170 | [AS_HELP_STRING([--enable-password-save], [allow --askpass and --auth-user-pass passwords to be read from a file @<:@default=yes@:>@])], |
51bd56f4 | 171 | [enable_password_save="no"] |
6fbf66fa JY |
172 | ) |
173 | ||
51bd56f4 ABL |
174 | AC_ARG_ENABLE( |
175 | [iproute2], | |
709f7a1f | 176 | [AS_HELP_STRING([--enable-iproute2], [enable support for iproute2 @<:@default=no@:>@])], |
51bd56f4 ABL |
177 | , |
178 | [enable_iproute2="no"] | |
fb7aa54a JY |
179 | ) |
180 | ||
51bd56f4 ABL |
181 | AC_ARG_ENABLE( |
182 | [def-auth], | |
709f7a1f | 183 | [AS_HELP_STRING([--disable-def-auth], [disable deferred authentication @<:@default=yes@:>@])], |
51bd56f4 ABL |
184 | , |
185 | [enable_def_auth="yes"] | |
fb7aa54a JY |
186 | ) |
187 | ||
51bd56f4 ABL |
188 | AC_ARG_ENABLE( |
189 | [pf], | |
709f7a1f | 190 | [AS_HELP_STRING([--disable-pf], [disable internal packet filter @<:@default=yes@:>@])], |
51bd56f4 ABL |
191 | , |
192 | [enable_pf="yes"] | |
6fbf66fa JY |
193 | ) |
194 | ||
51bd56f4 ABL |
195 | AC_ARG_ENABLE( |
196 | [strict], | |
709f7a1f | 197 | [AS_HELP_STRING([--enable-strict], [enable strict compiler warnings (debugging option) @<:@default=no@:>@])], |
51bd56f4 ABL |
198 | , |
199 | [enable_strict="no"] | |
6fbf66fa JY |
200 | ) |
201 | ||
51bd56f4 ABL |
202 | AC_ARG_ENABLE( |
203 | [pedantic], | |
709f7a1f | 204 | [AS_HELP_STRING([--enable-pedantic], [enable pedantic compiler warnings, will not generate a working executable (debugging option) @<:@default=no@:>@])], |
51bd56f4 ABL |
205 | , |
206 | [enable_pedantic="no"] | |
6fbf66fa JY |
207 | ) |
208 | ||
51bd56f4 ABL |
209 | AC_ARG_ENABLE( |
210 | [strict-options], | |
709f7a1f | 211 | [AS_HELP_STRING([--enable-strict-options], [enable strict options check between peers (debugging option) @<:@default=no@:>@])], |
51bd56f4 ABL |
212 | , |
213 | [enable_strict_options="no"] | |
6fbf66fa JY |
214 | ) |
215 | ||
51bd56f4 ABL |
216 | AC_ARG_ENABLE( |
217 | [selinux], | |
709f7a1f | 218 | [AS_HELP_STRING([--enable-selinux], [enable SELinux support @<:@default=no@:>@])], |
51bd56f4 ABL |
219 | , |
220 | [enable_selinux="no"] | |
99385447 JY |
221 | ) |
222 | ||
51bd56f4 ABL |
223 | AC_ARG_ENABLE( |
224 | [systemd], | |
709f7a1f | 225 | [AS_HELP_STRING([--enable-systemd], [enable systemd suppport @<:@default=no@:>@])], |
51bd56f4 ABL |
226 | , |
227 | [enable_systemd="no"] | |
9449e6a9 FC |
228 | ) |
229 | ||
51bd56f4 ABL |
230 | AC_ARG_WITH( |
231 | [mem-check], | |
709f7a1f | 232 | [AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=no|dmalloc|valgrind|ssl @<:@default=no@:>@])], |
51bd56f4 ABL |
233 | [ |
234 | case "${withval}" in | |
235 | dmalloc|valgrind|ssl|no) ;; | |
236 | *) AC_MSG_ERROR([bad value ${withval} for --mem-check]) ;; | |
237 | esac | |
238 | ], | |
239 | [with_mem_check="no"] | |
6fbf66fa JY |
240 | ) |
241 | ||
51bd56f4 | 242 | AC_ARG_WITH( |
9b33b5a4 ABL |
243 | [crypto-library], |
244 | [AS_HELP_STRING([--with-crypto-library=library], [build with the given crypto library, TYPE=openssl|polarssl @<:@default=openssl@:>@])], | |
51bd56f4 ABL |
245 | [ |
246 | case "${withval}" in | |
247 | openssl|polarssl) ;; | |
9b33b5a4 | 248 | *) AC_MSG_ERROR([bad value ${withval} for --with-crypto-library]) ;; |
51bd56f4 ABL |
249 | esac |
250 | ], | |
9b33b5a4 | 251 | [with_crypto_library="openssl"] |
0a180174 | 252 | ) |
0a180174 | 253 | |
51bd56f4 | 254 | AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${host}", [A string representing our host]) |
86715242 | 255 | case "$host" in |
51bd56f4 ABL |
256 | *-*-linux*) |
257 | AC_DEFINE([TARGET_LINUX], [1], [Are we running on Linux?]) | |
258 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["L"], [Target prefix]) | |
259 | ;; | |
260 | *-*-solaris*) | |
261 | AC_DEFINE([TARGET_SOLARIS], [1], [Are we running on Solaris?]) | |
262 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["S"], [Target prefix]) | |
263 | ;; | |
264 | *-*-openbsd*) | |
265 | AC_DEFINE([TARGET_OPENBSD], [1], [Are we running on OpenBSD?]) | |
266 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["O"], [Target prefix]) | |
267 | ;; | |
268 | *-*-freebsd*) | |
269 | AC_DEFINE([TARGET_FREEBSD], [1], [Are we running on FreeBSD?]) | |
270 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["F"], [Target prefix]) | |
271 | ;; | |
272 | *-*-netbsd*) | |
273 | AC_DEFINE([TARGET_NETBSD], [1], [Are we running NetBSD?]) | |
274 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["N"], [Target prefix]) | |
275 | ;; | |
276 | *-*-darwin*) | |
277 | AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?]) | |
278 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix]) | |
279 | dnl some Mac OS X tendering (we use vararg macros...) | |
280 | CPPFLAGS="$CPPFLAGS -no-cpp-precomp" | |
281 | ;; | |
282 | *-mingw*) | |
283 | AC_DEFINE([TARGET_WIN32], [1], [Are we running WIN32?]) | |
284 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["W"], [Target prefix]) | |
4b1a82db ABL |
285 | CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN" |
286 | CPPFLAGS="${CPPFLAGS} -DNTDDI_VERSION=NTDDI_WINXP -D_WIN32_WINNT=_WIN32_WINNT_WINXP" | |
51bd56f4 | 287 | WIN32=yes |
51bd56f4 ABL |
288 | ;; |
289 | *-*-dragonfly*) | |
290 | AC_DEFINE([TARGET_DRAGONFLY], [1], [Are we running on DragonFlyBSD?]) | |
291 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["D"], [Target prefix]) | |
292 | ;; | |
293 | *) | |
294 | AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["X"], [Target prefix]) | |
295 | ;; | |
6fbf66fa JY |
296 | esac |
297 | ||
51bd56f4 ABL |
298 | PKG_PROG_PKG_CONFIG |
299 | AC_PROG_CPP | |
6fbf66fa | 300 | AC_PROG_INSTALL |
51bd56f4 ABL |
301 | AC_PROG_LN_S |
302 | AC_PROG_MAKE_SET | |
6fbf66fa | 303 | |
c3fc703d ABL |
304 | AC_ARG_VAR([IFCONFIG], [full path to ipconfig utility]) |
305 | AC_ARG_VAR([ROUTE], [full path to route utility]) | |
306 | AC_ARG_VAR([IPROUTE], [full path to ip utility]) | |
307 | AC_ARG_VAR([NETSTAT], [path to netstat utility]) # tests | |
308 | AC_ARG_VAR([MAN2HTML], [path to man2html utility]) | |
309 | AC_PATH_PROGS([IFCONFIG], [ifconfig],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin]) | |
310 | AC_PATH_PROGS([ROUTE], [route],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin]) | |
311 | AC_PATH_PROGS([IPROUTE], [ip],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin]) | |
312 | AC_CHECK_PROGS([NETSTAT], [netstat], [netstat], [$PATH:/usr/local/sbin:/usr/sbin:/sbin:/etc]) # tests | |
313 | AC_CHECK_PROGS([MAN2HTML], [man2html]) | |
314 | AC_DEFINE_UNQUOTED([IFCONFIG_PATH], ["$IFCONFIG"], [Path to ifconfig tool]) | |
315 | AC_DEFINE_UNQUOTED([IPROUTE_PATH], ["$IPROUTE"], [Path to iproute tool]) | |
316 | AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route tool]) | |
317 | ||
98bc1a3e ABL |
318 | # |
319 | # Libtool | |
320 | # | |
321 | ifdef( | |
322 | [LT_INIT], | |
323 | [ | |
324 | LT_INIT([win32-dll]) | |
325 | LT_LANG([Windows Resource]) | |
326 | ], | |
327 | [ | |
328 | AC_LIBTOOL_WIN32_DLL | |
329 | AC_LIBTOOL_RC | |
330 | AC_PROG_LIBTOOL | |
331 | ] | |
332 | ) | |
333 | ||
6fbf66fa JY |
334 | AC_C_CONST |
335 | AC_C_INLINE | |
336 | AC_C_VOLATILE | |
337 | AC_TYPE_OFF_T | |
338 | AC_TYPE_PID_T | |
339 | AC_TYPE_SIZE_T | |
340 | AC_TYPE_UID_T | |
51bd56f4 ABL |
341 | AC_TYPE_INT8_T |
342 | AC_TYPE_INT16_T | |
343 | AC_TYPE_INT32_T | |
344 | AC_TYPE_INT64_T | |
345 | AC_TYPE_UINT8_T | |
346 | AC_TYPE_UINT16_T | |
347 | AC_TYPE_UINT32_T | |
348 | AC_TYPE_UINT64_T | |
349 | AC_TYPE_SIGNAL | |
6fbf66fa JY |
350 | AX_CPP_VARARG_MACRO_ISO |
351 | AX_CPP_VARARG_MACRO_GCC | |
0dbd45db | 352 | AX_TYPE_SOCKLEN_T |
6fbf66fa | 353 | AX_EMPTY_ARRAY |
51bd56f4 ABL |
354 | AC_CHECK_SIZEOF([unsigned int]) |
355 | AC_CHECK_SIZEOF([unsigned long]) | |
356 | AC_CHECK_HEADERS([ \ | |
357 | stdio.h stdarg.h \ | |
358 | time.h errno.h fcntl.h io.h direct.h \ | |
359 | ctype.h sys/types.h sys/socket.h \ | |
bdae4110 | 360 | signal.h unistd.h dlfcn.h \ |
51bd56f4 ABL |
361 | netinet/in.h netinet/in_systm.h \ |
362 | netinet/tcp.h arpa/inet.h netdb.h \ | |
363 | windows.h winsock2.h ws2tcpip.h \ | |
364 | ]) | |
cab53332 ABL |
365 | AC_CHECK_HEADERS([ \ |
366 | sys/time.h sys/un.h sys/ioctl.h sys/stat.h \ | |
367 | sys/mman.h sys/file.h \ | |
368 | unistd.h signal.h \ | |
369 | syslog.h pwd.h grp.h \ | |
370 | net/if_tun.h net/tun/if_tun.h stropts.h \ | |
371 | sys/sockio.h \ | |
372 | sys/uio.h linux/if_tun.h linux/sockios.h \ | |
373 | linux/types.h sys/poll.h sys/epoll.h err.h \ | |
374 | ]) | |
6fbf66fa | 375 | |
51bd56f4 ABL |
376 | SOCKET_INCLUDES=" |
377 | #ifdef HAVE_STDLIB_H | |
378 | #include <stdlib.h> | |
379 | #endif | |
380 | #ifdef HAVE_SYS_TYPES_H | |
381 | #include <sys/types.h> | |
382 | #endif | |
383 | #ifdef HAVE_SYS_SOCKET_H | |
384 | #include <sys/socket.h> | |
385 | #endif | |
386 | #ifdef HAVE_NETINET_IN_H | |
387 | #include <netinet/in.h> | |
388 | #endif | |
389 | #ifdef HAVE_WINDOWS_H | |
390 | #include <windows.h> | |
391 | #endif | |
392 | #ifdef HAVE_WINSOCK2_H | |
393 | #include <winsock2.h> | |
394 | #endif | |
395 | #ifdef HAVE_WS2TCPIP_H | |
396 | #include <ws2tcpip.h> | |
397 | #endif | |
398 | " | |
1bda73a7 | 399 | |
cab53332 ABL |
400 | AC_CHECK_HEADERS( |
401 | [net/if.h netinet/ip.h netinet/if_ether.h resolv.h], | |
51bd56f4 | 402 | , |
51bd56f4 | 403 | , |
cab53332 | 404 | [[${SOCKET_INCLUDES}]] |
51bd56f4 ABL |
405 | ) |
406 | ||
407 | AC_CHECK_TYPES( | |
6fbf66fa | 408 | [in_addr_t], |
51bd56f4 ABL |
409 | , |
410 | [AC_DEFINE([in_addr_t], [uint32_t], [Workaround missing in_addr_t])], | |
411 | [[${SOCKET_INCLUDES}]] | |
412 | ) | |
6fbf66fa JY |
413 | AC_CHECK_TYPE( |
414 | [struct tun_pi], | |
415 | [AC_DEFINE(HAVE_TUN_PI, 1, [struct tun_pi needed for IPv6 support])], | |
51bd56f4 ABL |
416 | , |
417 | [[${SOCKET_INCLUDES}]] | |
418 | ) | |
6fbf66fa JY |
419 | AC_CHECK_TYPE( |
420 | [struct iphdr], | |
421 | [AC_DEFINE(HAVE_IPHDR, 1, [struct iphdr needed for IPv6 support])], | |
51bd56f4 ABL |
422 | , |
423 | [[${SOCKET_INCLUDES}]] | |
424 | ) | |
6fbf66fa JY |
425 | AC_CHECK_TYPE( |
426 | [struct sock_extended_err], | |
427 | [AC_DEFINE(HAVE_SOCK_EXTENDED_ERR, 1, [struct sock_extended_err needed for extended socket error support])], | |
51bd56f4 ABL |
428 | , |
429 | [[${SOCKET_INCLUDES}]] | |
430 | ) | |
6fbf66fa JY |
431 | AC_CHECK_TYPE( |
432 | [struct msghdr], | |
433 | [AC_DEFINE(HAVE_MSGHDR, 1, [struct msghdr needed for extended socket error support])], | |
51bd56f4 ABL |
434 | , |
435 | [[${SOCKET_INCLUDES}]] | |
436 | ) | |
6fbf66fa JY |
437 | AC_CHECK_TYPE( |
438 | [struct cmsghdr], | |
439 | [AC_DEFINE(HAVE_CMSGHDR, 1, [struct cmsghdr needed for extended socket error support])], | |
51bd56f4 ABL |
440 | , |
441 | [[${SOCKET_INCLUDES}]] | |
442 | ) | |
8bc93d7f JY |
443 | AC_CHECK_TYPE( |
444 | [struct in_pktinfo], | |
445 | [AC_DEFINE(HAVE_IN_PKTINFO, 1, [struct in_pktinfo needed for IP_PKTINFO support])], | |
51bd56f4 ABL |
446 | , |
447 | [[${SOCKET_INCLUDES}]] | |
448 | ) | |
449 | AC_CHECK_TYPE( | |
450 | [struct sockaddr_in6], | |
451 | , | |
452 | [AC_MSG_ERROR([struct sockaddr_in6 not found, needed for ipv6 transport support.])], | |
453 | [[${SOCKET_INCLUDES}]] | |
454 | ) | |
cab53332 ABL |
455 | AC_CHECK_DECLS( |
456 | [SO_MARK], | |
457 | , | |
458 | , | |
459 | [[${SOCKET_INCLUDES}]] | |
460 | ) | |
51bd56f4 | 461 | |
cab53332 ABL |
462 | dnl We emulate signals in Windows |
463 | AC_CHECK_DECLS( | |
464 | [SIGHUP], | |
51bd56f4 | 465 | , |
cab53332 ABL |
466 | [AC_DEFINE([SIGHUP], [1], [SIGHUP replacement])], |
467 | [[ | |
468 | #ifdef HAVE_SIGNAL_H | |
469 | #include <signal.h> | |
470 | #endif | |
471 | ]] | |
51bd56f4 | 472 | ) |
cab53332 ABL |
473 | AC_CHECK_DECLS( |
474 | [SIGINT], | |
475 | , | |
476 | [AC_DEFINE([SIGINT], [2], [SIGINT replacement])], | |
477 | [[ | |
478 | #ifdef HAVE_SIGNAL_H | |
479 | #include <signal.h> | |
480 | #endif | |
481 | ]] | |
482 | ) | |
483 | AC_CHECK_DECLS( | |
484 | [SIGUSR1], | |
485 | , | |
486 | [AC_DEFINE([SIGUSR1], [10], [SIGUSR1 replacement])], | |
487 | [[ | |
488 | #ifdef HAVE_SIGNAL_H | |
489 | #include <signal.h> | |
490 | #endif | |
491 | ]] | |
492 | ) | |
493 | AC_CHECK_DECLS( | |
494 | [SIGUSR2], | |
495 | , | |
496 | [AC_DEFINE([SIGUSR2], [12], [SIGUSR2 replacement])], | |
497 | [[ | |
498 | #ifdef HAVE_SIGNAL_H | |
499 | #include <signal.h> | |
500 | #endif | |
501 | ]] | |
502 | ) | |
503 | AC_CHECK_DECLS( | |
504 | [SIGTERM], | |
505 | , | |
506 | [AC_DEFINE([SIGTERM], [15], [SIGTERM replacement])], | |
507 | [[ | |
508 | #ifdef HAVE_SIGNAL_H | |
509 | #include <signal.h> | |
510 | #endif | |
511 | ]] | |
512 | ) | |
513 | ||
514 | AC_FUNC_FORK | |
515 | ||
51bd56f4 ABL |
516 | AC_CHECK_FUNCS([ \ |
517 | daemon chroot getpwnam setuid nice system getpid dup dup2 \ | |
518 | getpass strerror syslog openlog mlockall getgrnam setgid \ | |
519 | setgroups stat flock readv writev time gettimeofday \ | |
cab53332 | 520 | ctime memset vsnprintf strdup \ |
51bd56f4 ABL |
521 | setsid chdir putenv getpeername unlink \ |
522 | chsize ftruncate execve getpeereid umask basename dirname access \ | |
523 | epoll_create \ | |
524 | ]) | |
525 | AC_CHECK_FUNCS([sendmsg recvmsg]) | |
526 | AC_CHECK_FUNCS( | |
527 | [res_init], | |
528 | , | |
529 | , | |
530 | [[#include <resolv.h>]] | |
531 | ) | |
0eb2ee14 JY |
532 | |
533 | # Windows use stdcall for winsock so we cannot auto detect these | |
51bd56f4 ABL |
534 | m4_define( |
535 | [SOCKET_FUNCS], | |
536 | [socket recv recvfrom send sendto listen dnl | |
537 | accept connect bind select gethostbyname inet_ntoa]dnl | |
538 | ) | |
539 | m4_define( | |
540 | [SOCKET_OPT_FUNCS], | |
541 | [setsockopt getsockopt getsockname poll]dnl | |
542 | ) | |
1bda73a7 | 543 | if test "${WIN32}" = "yes"; then |
1bda73a7 | 544 | AC_DEFINE([HAVE_GETTIMEOFDAY], [1], [We fake gettimeofday for win32 at otime.c]) |
51bd56f4 ABL |
545 | m4_foreach( |
546 | [F], | |
547 | m4_split(SOCKET_FUNCS SOCKET_OPT_FUNCS), | |
548 | m4_define([UF], [[m4_join([_], [HAVE], m4_toupper(F))]]) | |
549 | AC_DEFINE([UF], [1], [Win32 builtin]) | |
550 | ) | |
1bda73a7 | 551 | else |
51bd56f4 ABL |
552 | AC_CHECK_FUNCS( |
553 | SOCKET_FUNCS, | |
554 | , | |
555 | [AC_MSG_ERROR([Required library function not found])] | |
556 | ) | |
557 | AC_CHECK_FUNCS(SOCKET_OPT_FUNCS) | |
558 | fi | |
559 | ||
bdae4110 ABL |
560 | AC_CHECK_LIB( |
561 | [dl], | |
562 | [dlopen], | |
563 | [DL_LIBS="-ldl"] | |
564 | ) | |
565 | AC_SUBST([DL_LIBS]) | |
566 | ||
7647a48c ABL |
567 | AC_CHECK_LIB( |
568 | [nsl], | |
569 | [inet_ntoa], | |
570 | [SOCKETS_LIBS="${SOCKETS_LIBS} -lnsl"] | |
571 | ) | |
572 | AC_CHECK_LIB( | |
573 | [socket], | |
574 | [socket], | |
575 | [SOCKETS_LIBS="${SOCKETS_LIBS} -lsocket"] | |
576 | ) | |
577 | AC_CHECK_LIB( | |
578 | [resolv], | |
579 | [gethostbyname], | |
580 | [SOCKETS_LIBS="${SOCKETS_LIBS} -lresolv"] | |
581 | ) | |
582 | AC_SUBST([SOCKETS_LIBS]) | |
583 | ||
cd5990e0 ABL |
584 | AC_CHECK_LIB( |
585 | [selinux], | |
586 | [setcon], | |
587 | [SELINUX_LIBS="-lselinux"] | |
588 | ) | |
589 | AC_SUBST([SELINUX_LIBS]) | |
590 | ||
51bd56f4 ABL |
591 | case "${with_mem_check}" in |
592 | valgrind) | |
593 | AC_CHECK_HEADER( | |
594 | [valgrind/memcheck.h], | |
595 | [ | |
596 | CFLAGS="${CFLAGS} -g -fno-inline" | |
597 | AC_DEFINE( | |
598 | [USE_VALGRIND], | |
599 | [1], | |
600 | [Use valgrind memory debugging library] | |
601 | ) | |
602 | ], | |
603 | [AC_MSG_ERROR([valgrind headers not found.])] | |
604 | ) | |
605 | ;; | |
606 | dmalloc) | |
607 | AC_CHECK_HEADER( | |
608 | [dmalloc.h], | |
609 | [AC_CHECK_LIB( | |
610 | [dmalloc], | |
611 | [malloc], | |
612 | [ | |
e02570fd | 613 | LIBS="${LIBS} -ldmalloc" |
51bd56f4 ABL |
614 | AC_DEFINE( |
615 | [DMALLOC], | |
616 | [1], | |
617 | [Use dmalloc memory debugging library] | |
618 | ) | |
619 | ], | |
620 | [AC_MSG_ERROR([dmalloc library not found.])] | |
621 | )], | |
622 | [AC_MSG_ERROR([dmalloc headers not found.])] | |
623 | ) | |
624 | ;; | |
625 | ssl) | |
626 | AC_CHECK_LIB( | |
627 | [ssl], | |
628 | [CRYPTO_mem_ctrl], | |
629 | [ | |
630 | AC_DEFINE( | |
631 | [CRYPTO_MDEBUG], | |
632 | [1], | |
633 | [Use memory debugging function in OpenSSL] | |
634 | ) | |
635 | AC_MSG_NOTICE([NOTE: OpenSSL library must be compiled with CRYPTO_MDEBUG]) | |
636 | ], | |
637 | [AC_MSG_ERROR([Memory Debugging function in OpenSSL library not found.])] | |
638 | ) | |
639 | ;; | |
640 | esac | |
6fbf66fa | 641 | |
9b33b5a4 ABL |
642 | PKG_CHECK_MODULES( |
643 | [OPENSSL_CRYPTO], | |
644 | [libcrypto >= 0.9.6], | |
645 | [have_openssl_crypto="yes"], | |
646 | [AC_CHECK_LIB( | |
647 | [crypto], | |
648 | [RSA_new], | |
649 | [ | |
650 | have_openssl_crypto="yes" | |
651 | OPENSSL_CRYPTO_LIBS="-lcrypto" | |
652 | ] | |
653 | )] | |
654 | ) | |
655 | ||
656 | PKG_CHECK_MODULES( | |
657 | [OPENSSL_SSL], | |
658 | [libssl >= 0.9.6], | |
659 | [have_openssl_ssl="yes"], | |
660 | [AC_CHECK_LIB( | |
661 | [ssl], | |
662 | [SSL_CTX_new], | |
663 | [ | |
664 | have_openssl_ssl="yes" | |
665 | OPENSSL_SSL_LIBS="-lssl" | |
666 | ] | |
667 | )] | |
668 | ) | |
669 | ||
670 | if test "${have_openssl_crypto}" = "yes"; then | |
671 | saved_CFLAGS="${CFLAGS}" | |
672 | saved_LIBS="${LIBS}" | |
673 | CFLAGS="${CFLAGS} ${OPENSSL_CRYPTO_CFLAGS}" | |
674 | LIBS="${LIBS} ${OPENSSL_CRYPTO_LIBS}" | |
675 | AC_CHECK_FUNCS([EVP_CIPHER_CTX_set_key_length]) | |
676 | have_openssl_engine="yes" | |
677 | AC_CHECK_FUNCS( | |
678 | [ \ | |
679 | ENGINE_load_builtin_engines \ | |
680 | ENGINE_register_all_complete \ | |
681 | ENGINE_cleanup \ | |
682 | ], | |
683 | , | |
684 | [have_openssl_engine="no"; break] | |
685 | ) | |
686 | ||
687 | CFLAGS="${saved_CFLAGS}" | |
688 | LIBS="${saved_LIBS}" | |
689 | fi | |
690 | ||
691 | AC_ARG_VAR([POLARSSL_CFLAGS], [C compiler flags for polarssl]) | |
692 | AC_ARG_VAR([POLARSSL_LIBS], [linker flags for polarssl]) | |
693 | have_polarssl_ssl="yes" | |
694 | have_polarssl_crypto="yes" | |
695 | if test -z "${POLARSSL_LIBS}"; then | |
696 | AC_CHECK_LIB( | |
697 | [polarssl], | |
698 | [ssl_init], | |
699 | [POLARSSL_LIBS="-lpolarssl"], | |
700 | [ | |
701 | have_polarssl_ssl="no" | |
702 | AC_CHECK_LIB( | |
703 | [polarssl], | |
704 | [aes_crypt_cbc], | |
705 | , | |
706 | [have_polarssl_crypto="no"] | |
707 | ) | |
708 | ] | |
709 | ) | |
710 | fi | |
711 | ||
74bbc71b ABL |
712 | AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo]) |
713 | AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) | |
714 | have_lzo="yes" | |
715 | if test -z "${LZO_LIBS}"; then | |
716 | AC_CHECK_LIB( | |
717 | [lzo2], | |
718 | [lzo1x_1_15_compress], | |
719 | [LZO_LIBS="-llzo2"], | |
720 | [AC_CHECK_LIB( | |
721 | [lzo], | |
722 | [lzo1x_1_15_compress], | |
723 | [LZO_LIBS="-llzo"], | |
724 | [have_lzo="no"] | |
725 | )] | |
726 | ) | |
727 | fi | |
728 | if test "${have_lzo}" = "yes"; then | |
729 | saved_CFLAGS="${CFLAGS}" | |
730 | CFLAGS="${CFLAGS} ${LZO_CFLAGS}" | |
731 | AC_CHECK_HEADERS( | |
732 | [lzo/lzoutil.h], | |
733 | , | |
734 | [AC_CHECK_HEADERS( | |
735 | [lzoutil.h], | |
736 | , | |
737 | [AC_MSG_ERROR([lzoutil.h is missing])] | |
738 | )] | |
739 | ) | |
740 | AC_CHECK_HEADERS( | |
741 | [lzo/lzo1x.h], | |
742 | , | |
743 | [AC_CHECK_HEADERS( | |
744 | [lzo1x.h], | |
745 | , | |
746 | [AC_MSG_ERROR([lzo1x.h is missing])] | |
747 | )] | |
748 | ) | |
749 | CFLAGS="${saved_CFLAGS}" | |
6fbf66fa JY |
750 | fi |
751 | ||
18b5fbdf ABL |
752 | PKG_CHECK_MODULES( |
753 | [PKCS11_HELPER], | |
754 | [libpkcs11-helper-1 >= 1.02], | |
755 | [have_pkcs11_helper="yes"], | |
756 | [] | |
757 | ) | |
53f97e1e | 758 | |
51bd56f4 ABL |
759 | if test -n "${SP_PLATFORM_WINDOWS}"; then |
760 | AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ['\\\\'], [Path separator]) #" | |
761 | AC_DEFINE_UNQUOTED([PATH_SEPARATOR_STR], ["\\\\"], [Path separator]) #" | |
762 | else | |
763 | AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ['/'], [Path separator]) | |
764 | AC_DEFINE_UNQUOTED([PATH_SEPARATOR_STR], ["/"], [Path separator]) | |
765 | fi | |
766 | ||
767 | dnl enable --x509-username-field feature if requested | |
768 | if test "${enable_x509_alt_username}" = "yes"; then | |
9b33b5a4 | 769 | if test "${with_crypto_library}" = "polarssl" ; then |
51bd56f4 ABL |
770 | AC_MSG_ERROR([PolarSSL does not support the --x509-username-field feature]) |
771 | fi | |
772 | ||
773 | AC_DEFINE([ENABLE_X509ALTUSERNAME], [1], [Enable --x509-username-field feature]) | |
774 | fi | |
775 | ||
776 | test "${ac_cv_header_sys_uio_h}" = "yes" && AC_DEFINE([HAVE_IOVEC], [1], [struct iovec needed for IPv6 support]) | |
777 | test "${enable_multi}" = "yes" && AC_DEFINE([ENABLE_CLIENT_SERVER], [1], [Enable client/server capability]) | |
778 | test "${enable_server}" = "no" && AC_DEFINE([ENABLE_CLIENT_ONLY], [1], [Enable client capability only]) | |
779 | test "${enable_management}" = "yes" && AC_DEFINE([ENABLE_MANAGEMENT], [1], [Enable management server capability]) | |
780 | test "${enable_socks}" = "yes" && AC_DEFINE([ENABLE_SOCKS], [1], [Enable Socks proxy support]) | |
781 | test "${enable_http_proxy}" = "yes" && AC_DEFINE([ENABLE_HTTP_PROXY], [1], [Enable HTTP proxy support]) | |
782 | test "${enable_multihome}" = "yes" && AC_DEFINE([ENABLE_MULTIHOME], [1], [Enable multi-homed UDP server capability]) | |
783 | test "${enable_debug}" = "yes" && AC_DEFINE([ENABLE_DEBUG], [1], [Enable debugging support]) | |
784 | test "${enable_small}" = "yes" && AC_DEFINE([ENABLE_SMALL], [1], [Enable smaller executable size]) | |
785 | test "${enable_fragment}" = "yes" && AC_DEFINE([ENABLE_FRAGMENT], [1], [Enable internal fragmentation support]) | |
786 | test "${enable_port_share}" = "yes" && AC_DEFINE([ENABLE_PORT_SHARE], [1], [Enable TCP Server port sharing]) | |
787 | test "${enable_def_auth}" = "yes" && AC_DEFINE([ENABLE_DEF_AUTH], [1], [Enable deferred authentication]) | |
788 | test "${enable_pf}" = "yes" && AC_DEFINE([ENABLE_PF], [1], [Enable internal packet filter]) | |
789 | test "${enable_strict_options}" = "yes" && AC_DEFINE([ENABLE_STRICT_OPTIONS_CHECK], [1], [Enable strict options check between peers]) | |
790 | test "${enable_password_save}" = "yes" && AC_DEFINE([ENABLE_PASSWORD_SAVE], [1], [Allow --askpass and --auth-user-pass passwords to be read from a file]) | |
791 | test "${enable_systemd}" = "yes" && AC_DEFINE([ENABLE_SYSTEMD], [1], [Enable systemd support]) | |
c3fc703d | 792 | |
9b33b5a4 ABL |
793 | case "${with_crypto_library}" in |
794 | openssl) | |
795 | have_crypto_crypto="${have_openssl_crypto}" | |
796 | have_crypto_ssl="${have_openssl_ssl}" | |
797 | CRYPTO_CRYPTO_CFLAGS="${OPENSSL_CRYPTO_CFLAGS}" | |
798 | CRYPTO_CRYPTO_LIBS="${OPENSSL_CRYPTO_LIBS}" | |
799 | CRYPTO_SSL_CFLAGS="${OPENSSL_SSL_CFLAGS}" | |
800 | CRYPTO_SSL_LIBS="${OPENSSL_SSL_LIBS}" | |
801 | AC_DEFINE([ENABLE_CRYPTO_OPENSSL], [1], [Use OpenSSL library]) | |
802 | test "${have_openssl_engine}" = "yes" && AC_DEFINE([HAVE_OPENSSL_ENGINE], [1], [Use crypto library]) | |
803 | ;; | |
804 | polarssl) | |
805 | have_crypto_crypto="${have_polarssl_crypto}" | |
806 | have_crypto_ssl="${have_polarssl_ssl}" | |
807 | CRYPTO_CRYPTO_CFLAGS="${POLARSSL_CRYPTO_CFLAGS}" | |
808 | CRYPTO_CRYPTO_LIBS="${POLARSSL_LIBS}" | |
809 | AC_DEFINE([ENABLE_CRYPTO_POLARSSL], [1], [Use PolarSSL library]) | |
810 | ;; | |
811 | esac | |
812 | ||
813 | if test "${enable_ssl}" = "yes"; then | |
814 | test "${enable_crypto}" != "yes" && AC_MSG_ERROR([crypto must be enabled for ssl]) | |
815 | test "${have_crypto_ssl}" != "yes" && AC_MSG_ERROR([${with_ssl_library} ssl is required but missing]) | |
816 | OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_SSL_CFLAGS}" | |
817 | OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_SSL_LIBS}" | |
818 | AC_DEFINE([ENABLE_SSL], [1], [Enable ssl library]) | |
819 | fi | |
820 | ||
821 | if test "${enable_crypto}" = "yes"; then | |
822 | test "${have_crypto_crypto}" != "yes" && AC_MSG_ERROR([${with_crypto_library} crytpo is required but missing]) | |
823 | OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CRYPTO_CFLAGS}" | |
824 | OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_CRYPTO_LIBS}" | |
825 | AC_DEFINE([ENABLE_CRYPTO], [1], [Enable crypto library]) | |
826 | fi | |
827 | ||
bdae4110 ABL |
828 | if test "${enable_plugins}" = "yes"; then |
829 | test "${WIN32}" != "yes" -a -z "${DL_LIBS}" && AC_MSG_ERROR([libdl is required for plugins]) | |
830 | OPTIONAL_DL_LIBS="${DL_LIBS}" | |
831 | AC_DEFINE([ENABLE_PLUGIN], [1], [Enable systemd support]) | |
832 | test "${enable_eurephia}" = "yes" && AC_DEFINE([ENABLE_EUREPHIA], [1], [Enable support for the eurephia plug-in]) | |
833 | fi | |
834 | ||
c3fc703d ABL |
835 | if test "${enable_iproute2}" = "yes"; then |
836 | test -z "${IPROUTE}" && AC_MSG_ERROR([ip utility is required but missing]) | |
837 | AC_DEFINE([ENABLE_IPROUTE], [1], [enable iproute2 support]) | |
838 | else | |
839 | if test "${WIN32}" != "yes"; then | |
840 | test -z "${ROUTE}" && AC_MSG_ERROR([route utility is required but missing]) | |
841 | test -z "${IFCONFIG}" && AC_MSG_ERROR([ifconfig utility is required but missing]) | |
842 | fi | |
843 | fi | |
51bd56f4 | 844 | |
cd5990e0 ABL |
845 | if test "${enable_selinux}" = "yes"; then |
846 | test -z "${SELINUX_LIBS}" && AC_MSG_ERROR([libselinux required but missing]) | |
847 | OPTIONAL_SELINUX_LIBS="${SELINUX_LIBS}" | |
848 | AC_DEFINE([ENABLE_SELINUX], [1], [SELinux support]) | |
849 | fi | |
850 | ||
74bbc71b ABL |
851 | if test "${enable_lzo}" = "yes"; then |
852 | test "${have_lzo}" != "yes" && AC_MSG_ERROR([lzo enabled but missing]) | |
853 | OPTIONAL_LZO_CFLAGS="${LZO_CFLAGS}" | |
854 | OPTIONAL_LZO_LIBS="${LZO_LIBS}" | |
855 | AC_DEFINE([ENABLE_LZO], [1], [Enable LZO compression library]) | |
856 | fi | |
07084261 ABL |
857 | if test "${enable_lzo_stub}" = "yes"; then |
858 | test "${enable_lzo}" = "yes" && AC_MSG_ERROR([Cannot have both lzo stub and lzo enabled]) | |
859 | AC_DEFINE([ENABLE_LZO_STUB], [1], [Enable LZO stub capability]) | |
74bbc71b | 860 | AC_DEFINE([ENABLE_LZO], [1], [Enable LZO compression library]) |
07084261 ABL |
861 | fi |
862 | ||
18b5fbdf ABL |
863 | if test "${enable_pkcs11}" = "yes"; then |
864 | test "${have_pkcs11_helper}" != "yes" && AC_MSG_ERROR([PKCS11 enabled but libpkcs11-helper is missing]) | |
865 | test "${enable_ssl}" != "yes" && AC_MSG_ERROR([PKCS11 can be enabled only if SSL is enabled]) | |
866 | OPTIONAL_PKCS11_HELPER_CFLAGS="${PKCS11_HELPER_CFLAGS}" | |
867 | OPTIONAL_PKCS11_HELPER_LIBS="${PKCS11_HELPER_LIBS}" | |
868 | AC_DEFINE([ENABLE_PKCS11], [1], [Enable PKCS11]) | |
869 | fi | |
870 | ||
51bd56f4 ABL |
871 | if test "${enable_pedantic}" = "yes"; then |
872 | enable_strict="yes" | |
873 | CFLAGS="${CFLAGS} -ansi -pedantic" | |
874 | fi | |
875 | if test "${enable_strict}" = "yes"; then | |
876 | CFLAGS="${CFLAGS} -Wall -Wno-unused-parameter -Wno-unused-function" | |
99385447 JY |
877 | fi |
878 | ||
c3fc703d ABL |
879 | if test "${WIN32}" = "yes"; then |
880 | test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32]) | |
881 | fi | |
882 | ||
fcff80aa ABL |
883 | CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`" |
884 | AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings]) | |
885 | ||
ac2447cd ABL |
886 | TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID" |
887 | TAP_WIN_MIN_MAJOR="PRODUCT_TAP_WIN_MIN_MAJOR" | |
888 | TAP_WIN_MIN_MINOR="PRODUCT_TAP_WIN_MIN_MINOR" | |
889 | AC_DEFINE_UNQUOTED([TAP_WIN_COMPONENT_ID], ["${TAP_WIN_COMPONENT_ID}"], [The tap-windows id]) | |
890 | AC_DEFINE_UNQUOTED([TAP_WIN_MIN_MAJOR], [${TAP_WIN_MIN_MAJOR}], [The tap-windows version number is required for OpenVPN]) | |
891 | AC_DEFINE_UNQUOTED([TAP_WIN_MIN_MINOR], [${TAP_WIN_MIN_MINOR}], [The tap-windows version number is required for OpenVPN]) | |
892 | AC_SUBST([TAP_WIN_COMPONENT_ID]) | |
893 | AC_SUBST([TAP_WIN_MIN_MAJOR]) | |
894 | AC_SUBST([TAP_WIN_MIN_MINOR]) | |
1bda73a7 | 895 | |
bdae4110 | 896 | AC_SUBST([OPTIONAL_DL_LIBS]) |
cd5990e0 | 897 | AC_SUBST([OPTIONAL_SELINUX_LIBS]) |
9b33b5a4 ABL |
898 | AC_SUBST([OPTIONAL_CRYPTO_CFLAGS]) |
899 | AC_SUBST([OPTIONAL_CRYPTO_LIBS]) | |
74bbc71b ABL |
900 | AC_SUBST([OPTIONAL_LZO_CFLAGS]) |
901 | AC_SUBST([OPTIONAL_LZO_LIBS]) | |
18b5fbdf ABL |
902 | AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS]) |
903 | AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS]) | |
bdae4110 | 904 | |
51bd56f4 | 905 | AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) |
1bda73a7 | 906 | |
51bd56f4 | 907 | AC_CONFIG_FILES([ |
1bda73a7 | 908 | Makefile |
98bc1a3e | 909 | build/Makefile |
4b1a82db ABL |
910 | build/msvc/Makefile |
911 | build/msvc/msvc-generate/Makefile | |
34cb9132 ABL |
912 | distro/Makefile |
913 | distro/rpm/Makefile | |
914 | distro/rpm/openvpn.spec | |
915 | include/Makefile | |
916 | src/Makefile | |
917 | src/openvpn/Makefile | |
918 | src/openvpnserv/Makefile | |
919 | tests/Makefile | |
920 | sample/Makefile | |
921 | doc/Makefile | |
1bda73a7 | 922 | ]) |
34cb9132 | 923 | AC_CONFIG_FILES([tests/t_client.sh], [chmod +x tests/t_client.sh]) |
51bd56f4 | 924 | AC_OUTPUT |