28
AC_INIT([OpenVPN], [1.6.0], [openvpn-users@lists.sourceforge.net], [openvpn])
28
AC_INIT([OpenVPN], [2.0_rc6], [openvpn-users@lists.sourceforge.net], [openvpn])
29
29
AM_CONFIG_HEADER(config.h)
30
30
AC_CONFIG_SRCDIR(syshead.h)
33
[ --disable-lzo Do not compile LZO compression support],
33
[ --disable-lzo Disable LZO compression support],
34
34
[LZO="$enableval"],
38
38
AC_ARG_ENABLE(crypto,
39
[ --disable-crypto Do not compile OpenSSL crypto support],
39
[ --disable-crypto Disable OpenSSL crypto support],
40
40
[CRYPTO="$enableval"],
45
[ --disable-ssl Do not compile OpenSSL SSL support for TLS-based key exchange],
45
[ --disable-ssl Disable OpenSSL SSL support for TLS-based key exchange],
46
46
[SSL="$enableval"],
51
[ --disable-multi Disable client/server support (--mode server + client mode)],
57
[ --disable-server Disable server support only (but retain client support)],
58
[MULTI_SERVER="$enableval"],
62
AC_ARG_ENABLE(plugins,
63
[ --disable-plugins Disable plug-in support],
64
[PLUGINS="$enableval"],
68
AC_ARG_ENABLE(management,
69
[ --disable-management Disable management server support],
70
[MANAGEMENT="$enableval"],
75
[ --disable-socks Disable Socks support],
81
[ --disable-http Disable HTTP proxy support],
82
[HTTP_PROXY="$enableval"],
86
AC_ARG_ENABLE(fragment,
87
[ --disable-fragment Disable internal fragmentation support (--fragment)],
88
[FRAGMENT="$enableval"],
93
[ --disable-debug Disable debugging support (disable gremlin and verb 7+ messages)],
99
[ --enable-small Enable smaller executable size (disable OCC, usage message, and verb 4 parm list)],
100
[SMALL="$enableval"],
50
104
AC_ARG_ENABLE(pthread,
51
[ --enable-pthread Compile pthread support for improved SSL/TLS latency],
105
[ --enable-pthread Enable pthread support (Experimental for OpenVPN 2.0)],
52
106
[PTHREAD="$enableval"],
110
AC_ARG_ENABLE(password-save,
111
[ --enable-password-save Allow --askpass and --auth-user-pass passwords to be read from a file],
112
[PASSWORD_SAVE="$enableval"],
116
AC_ARG_ENABLE(iproute2,
117
[ --enable-iproute2 Enable support for iproute2],
118
AC_DEFINE(CONFIG_FEATURE_IPROUTE, 1, [enable iproute2 support])
56
121
AC_ARG_ENABLE(strict,
57
[ --enable-strict Enable strict compiler warnings],
122
[ --enable-strict Enable strict compiler warnings (debugging option)],
58
123
[STRICT="$enableval"],
62
127
AC_ARG_ENABLE(profiling,
63
[ --enable-profiling Enable profiling],
128
[ --enable-profiling Enable profiling (debugging option)],
64
129
[PROFILE="$enableval"],
68
AC_ARG_ENABLE(mtu-dynamic,
69
[ --disable-mtu-dynamic Disable dynamic MTU support],
70
[DYNAMIC_MTU="$enableval"],
74
133
AC_ARG_ENABLE(strict-options,
75
[ --enable-strict-options Enable strict options check between peers],
134
[ --enable-strict-options Enable strict options check between peers (debugging option)],
76
135
[STRICT_OPTIONS="$enableval"],
77
136
[STRICT_OPTIONS="no"]
122
181
AC_DEFINE_UNQUOTED(ROUTE_PATH, "$ROUTE", [Path to route tool])
124
AC_ARG_WITH(leak-check,
125
[ --with-leak-check=TYPE Build with memory leak checking, TYPE = dmalloc or ssl],
129
AC_ARG_ENABLE(iproute2,
130
[ --enable-iproute2 Enable support for iproute2],
131
AC_DEFINE(CONFIG_FEATURE_IPROUTE, 1, [enable iproute2 support])
183
AC_ARG_WITH(mem-check,
184
[ --with-mem-check=TYPE Build with debug memory checking, TYPE = dmalloc or valgrind],
185
[MEMCHECK="$withval"]
136
188
dnl Guess host type.
137
189
AC_CANONICAL_HOST
312
366
dnl check libraries
369
dnl Checking for a working epoll
370
AC_CHECKING([for working epoll implementation])
371
OLDLDFLAGS="$LDFLAGS"
372
LDFLAGS="$LDFLAGS -Wl,--fatal-warnings"
373
AC_CHECK_FUNCS(epoll_create, AC_DEFINE([HAVE_EPOLL_CREATE], 1, []))
374
LDFLAGS="$OLDLDFLAGS"
377
dnl check for valgrind tool
380
if test "$MEMCHECK" = "valgrind"; then
381
AC_CHECKING([for valgrind tool and Header files])
382
AC_CHECK_HEADER(valgrind/memcheck.h,
384
AC_DEFINE(USE_VALGRIND, 1, [Use valgrind memory debugging library])
385
CFLAGS="-g -fno-inline"
387
[AC_MSG_ERROR([valgrind headers not found.])]
316
392
dnl check for pthread library
319
395
if test "$PTHREAD" = "yes"; then
320
AC_CHECKING([for pthread support])
396
AC_CHECKING([for pthread support])
397
AC_MSG_RESULT([********* WARNING: pthread support is experimental for OpenVPN 2.0])
323
400
case "$target" in
325
402
AC_MSG_RESULT([WARNING: pthread support on OpenBSD is unstable!])
440
dnl Check for libdl library
442
if test "$PLUGINS" = "yes"; then
443
AC_CHECKING([for libdl Library and Header files])
444
AC_CHECK_HEADER(dlfcn.h,
445
[AC_CHECK_LIB(dl, dlopen,
447
OPENVPN_ADD_LIBS(-ldl)
448
AC_DEFINE(USE_LIBDL, 1, [Use libdl for dynamic library loading])
450
[AC_MSG_RESULT([libdl library not found.])]
452
[AC_MSG_RESULT([libdl headers not found.])]
363
457
dnl check for LZO library
402
496
AC_DEFINE(USE_CRYPTO, 1, [Use OpenSSL crypto library])
403
497
OPENVPN_ADD_LIBS(-lcrypto)
404
498
AC_CHECK_FUNCS(EVP_CIPHER_CTX_set_key_length)
500
dnl check for OpenSSL crypto acceleration capability
501
AC_CHECK_HEADERS(openssl/engine.h)
502
AC_CHECK_FUNCS(ENGINE_load_builtin_engines)
503
AC_CHECK_FUNCS(ENGINE_register_all_complete)
504
AC_CHECK_FUNCS(ENGINE_cleanup)
406
506
[AC_MSG_ERROR([OpenSSL crypto Library is too old.])]
543
dnl enable multi-client mode
544
if test "$MULTI" = "yes"; then
545
AC_DEFINE(ENABLE_CLIENT_SERVER, 1, [Enable client/server capability])
548
dnl enable client mode only, not server
549
if test "$MULTI_SERVER" = "no"; then
550
AC_DEFINE(ENABLE_CLIENT_ONLY, 1, [Enable client capability only])
553
dnl enable management server capability
554
if test "$MANAGEMENT" = "yes"; then
555
AC_DEFINE(ENABLE_MANAGEMENT, 1, [Enable management server capability])
559
if test "$SOCKS" = "yes"; then
560
AC_DEFINE(ENABLE_SOCKS, 1, [Enable Socks proxy support])
563
dnl enable HTTP proxy
564
if test "$HTTP_PROXY" = "yes"; then
565
AC_DEFINE(ENABLE_HTTP_PROXY, 1, [Enable HTTP proxy support])
569
if test "$DEBUG" = "yes"; then
570
AC_DEFINE(ENABLE_DEBUG, 1, [Enable debugging support])
573
dnl enable small size optimizations
574
if test "$SMALL" = "yes"; then
575
AC_DEFINE(ENABLE_SMALL, 1, [Enable smaller executable size])
578
dnl enable --fragment
579
if test "$FRAGMENT" = "yes"; then
580
AC_DEFINE(ENABLE_FRAGMENT, 1, [Enable internal fragmentation support])
443
583
dnl enable strict compiler warnings
444
584
if test "$STRICT" = "yes"; then
445
CFLAGS="$CFLAGS -Wall -W -Wpointer-arith -Wsign-compare -Winline -Wno-unused-parameter"
585
CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wsign-compare -Wno-unused-parameter -Wno-unused-function"
448
588
dnl enable profiling
455
595
AC_DEFINE(STRICT_OPTIONS_CHECK, 1, [Enable strict options check between peers])
458
dnl enable dynamic MTU capability
459
if test "$DYNAMIC_MTU" = "yes"; then
460
AC_DEFINE(FRAGMENT_ENABLE, 1, [Enable dynamic MTU capability])
598
dnl enable password save
599
if test "$PASSWORD_SAVE" = "yes"; then
600
AC_DEFINE(ENABLE_PASSWORD_SAVE, 1, [Allow --askpass and --auth-user-pass passwords to be read from a file])
463
603
AC_OUTPUT(Makefile openvpn.spec config-win32.h install-win32/openvpn.nsi)