diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 708 |
1 files changed, 430 insertions, 278 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for OpenVPN 2.4.9. +# Generated by GNU Autoconf 2.69 for OpenVPN 2.5.4. # # Report bugs to <openvpn-users@lists.sourceforge.net>. # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='OpenVPN' PACKAGE_TARNAME='openvpn' -PACKAGE_VERSION='2.4.9' -PACKAGE_STRING='OpenVPN 2.4.9' +PACKAGE_VERSION='2.5.4' +PACKAGE_STRING='OpenVPN 2.5.4' PACKAGE_BUGREPORT='openvpn-users@lists.sourceforge.net' PACKAGE_URL='' @@ -636,19 +636,21 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS -CMOCKA_INITIALIZED_FALSE -CMOCKA_INITIALIZED_TRUE -CMAKE TEST_CFLAGS TEST_LDFLAGS +ENABLE_UNITTESTS +ENABLE_UNITTESTS_FALSE +ENABLE_UNITTESTS_TRUE +CMOCKA_LIBS +CMOCKA_CFLAGS tmpfilesdir systemdunitdir sampledir plugindir +OPENSSL_ENGINE_FALSE +OPENSSL_ENGINE_TRUE HAVE_LD_WRAP_SUPPORT_FALSE HAVE_LD_WRAP_SUPPORT_TRUE -ENABLE_CRYPTO_FALSE -ENABLE_CRYPTO_TRUE ENABLE_PLUGIN_DOWN_ROOT_FALSE ENABLE_PLUGIN_DOWN_ROOT_TRUE ENABLE_PLUGIN_AUTH_PAM_FALSE @@ -677,6 +679,8 @@ OPTIONAL_INOTIFY_LIBS OPTIONAL_INOTIFY_CFLAGS P11KIT_LIBS P11KIT_CFLAGS +HAVE_SITNL_FALSE +HAVE_SITNL_TRUE libsystemd_LIBS libsystemd_CFLAGS ENABLE_SYSTEMD_FALSE @@ -717,11 +721,14 @@ LIBTOOL OBJDUMP DLLTOOL AS +HAVE_PYDOCUTILS_FALSE +HAVE_PYDOCUTILS_TRUE +RST2HTML +RST2MAN TMPFILES_DIR SYSTEMD_UNIT_DIR SYSTEMD_ASK_PASSWORD GIT -MAN2HTML NETSTAT IPROUTE ROUTE @@ -731,6 +738,8 @@ LN_S PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG +TARGET_LINUX_FALSE +TARGET_LINUX_TRUE PLUGINDIR EGREP GREP @@ -808,6 +817,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -836,10 +846,8 @@ enable_dependency_tracking enable_lzo enable_lz4 enable_comp_stub -enable_crypto enable_ofb_cfb enable_x509_alt_username -enable_server enable_plugins enable_management enable_pkcs11 @@ -872,6 +880,7 @@ with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock +enable_unit_tests ' ac_precious_vars='build_alias host_alias @@ -890,11 +899,12 @@ IFCONFIG ROUTE IPROUTE NETSTAT -MAN2HTML GIT SYSTEMD_ASK_PASSWORD SYSTEMD_UNIT_DIR TMPFILES_DIR +RST2MAN +RST2HTML LT_SYS_LIBRARY_PATH TAP_CFLAGS LIBPAM_CFLAGS @@ -914,7 +924,9 @@ libsystemd_LIBS P11KIT_CFLAGS P11KIT_LIBS OPTIONAL_INOTIFY_CFLAGS -OPTIONAL_INOTIFY_LIBS' +OPTIONAL_INOTIFY_LIBS +CMOCKA_CFLAGS +CMOCKA_LIBS' # Initialize some variables set by options. @@ -953,6 +965,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1205,6 +1218,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1342,7 +1364,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1455,7 +1477,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenVPN 2.4.9 to adapt to many kinds of systems. +\`configure' configures OpenVPN 2.5.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1495,6 +1517,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1525,7 +1548,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenVPN 2.4.9:";; + short | recursive ) echo "Configuration of OpenVPN 2.5.4:";; esac cat <<\_ACEOF @@ -1542,14 +1565,11 @@ Optional Features: --disable-lzo disable LZO compression support [default=yes] --disable-lz4 Disable LZ4 compression support --enable-comp-stub Don't compile compression support but still allow limited interoperability with compression-enabled peers - --disable-crypto disable crypto support [default=yes] --disable-ofb-cfb disable support for OFB and CFB cipher modes [default=yes] --enable-x509-alt-username enable the --x509-username-field feature [default=no] - --disable-server disable server support only (but retain client - support) [default=yes] --disable-plugins disable plug-in support [default=yes] --disable-management disable management server support [default=yes] --enable-pkcs11 enable pkcs11 support [default=no] @@ -1581,7 +1601,7 @@ Optional Features: --enable-strict-options enable strict options check between peers (debugging option) [default=no] --enable-selinux enable SELinux support [default=no] - --enable-systemd enable systemd suppport [default=no] + --enable-systemd enable systemd support [default=no] --enable-async-push enable async-push support for plugins providing deferred authentication [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] @@ -1589,6 +1609,7 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --disable-unit-tests Disables building and running the unit tests suite Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1628,7 +1649,6 @@ Some influential environment variables: ROUTE full path to route utility IPROUTE full path to ip utility NETSTAT path to netstat utility - MAN2HTML path to man2html utility GIT path to git utility SYSTEMD_ASK_PASSWORD path to systemd-ask-password utility @@ -1636,6 +1656,8 @@ Some influential environment variables: Path of systemd unit directory [default=LIBDIR/systemd/system] TMPFILES_DIR Path of tmpfiles directory [default=LIBDIR/tmpfiles.d] + RST2MAN path to rst2man utility + RST2HTML path to rst2html utility LT_SYS_LIBRARY_PATH User-defined run-time library search path. TAP_CFLAGS C compiler flags for tap @@ -1669,6 +1691,9 @@ Some influential environment variables: C compiler flags for OPTIONAL_INOTIFY, overriding pkg-config OPTIONAL_INOTIFY_LIBS linker flags for OPTIONAL_INOTIFY, overriding pkg-config + CMOCKA_CFLAGS + C compiler flags for CMOCKA, overriding pkg-config + CMOCKA_LIBS linker flags for CMOCKA, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1736,7 +1761,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenVPN configure 2.4.9 +OpenVPN configure 2.5.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2575,7 +2600,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenVPN $as_me 2.4.9, which was +It was created by OpenVPN $as_me 2.5.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2939,22 +2964,22 @@ if test -z "${htmldir}"; then fi -$as_echo "#define OPENVPN_VERSION_RESOURCE 2,4,9,0" >>confdefs.h +$as_echo "#define OPENVPN_VERSION_RESOURCE 2,5,4,0" >>confdefs.h OPENVPN_VERSION_MAJOR=2 -OPENVPN_VERSION_MINOR=4 +OPENVPN_VERSION_MINOR=5 -OPENVPN_VERSION_PATCH=.9 +OPENVPN_VERSION_PATCH=.4 $as_echo "#define OPENVPN_VERSION_MAJOR 2" >>confdefs.h -$as_echo "#define OPENVPN_VERSION_MINOR 4" >>confdefs.h +$as_echo "#define OPENVPN_VERSION_MINOR 5" >>confdefs.h -$as_echo "#define OPENVPN_VERSION_PATCH \".9\"" >>confdefs.h +$as_echo "#define OPENVPN_VERSION_PATCH \".4\"" >>confdefs.h ac_aux_dir= @@ -2992,6 +3017,8 @@ ac_config_headers="$ac_config_headers config.h include/openvpn-plugin.h" +# This foreign option prevents autoreconf from overriding our COPYING and +# INSTALL targets: am__api_version='1.16' # Find a good install program. We prefer a C program (faster), @@ -3478,7 +3505,7 @@ fi # Define the identity of the package. PACKAGE='openvpn' - VERSION='2.4.9' + VERSION='2.5.4' cat >>confdefs.h <<_ACEOF @@ -5167,15 +5194,6 @@ else fi -# Check whether --enable-crypto was given. -if test "${enable_crypto+set}" = set; then : - enableval=$enable_crypto; -else - enable_crypto="yes" - -fi - - # Check whether --enable-ofb-cfb was given. if test "${enable_ofb_cfb+set}" = set; then : enableval=$enable_ofb_cfb; @@ -5194,15 +5212,6 @@ else fi -# Check whether --enable-server was given. -if test "${enable_server+set}" = set; then : - enableval=$enable_server; -else - enable_server="yes" - -fi - - # Check whether --enable-plugins was given. if test "${enable_plugins+set}" = set; then : enableval=$enable_plugins; @@ -5457,16 +5466,33 @@ cat >>confdefs.h <<_ACEOF #define TARGET_ALIAS "${host}" _ACEOF + if false; then + TARGET_LINUX_TRUE= + TARGET_LINUX_FALSE='#' +else + TARGET_LINUX_TRUE='#' + TARGET_LINUX_FALSE= +fi + case "$host" in *-*-linux*) $as_echo "#define TARGET_LINUX 1" >>confdefs.h + if true; then + TARGET_LINUX_TRUE= + TARGET_LINUX_FALSE='#' +else + TARGET_LINUX_TRUE='#' + TARGET_LINUX_FALSE= +fi + cat >>confdefs.h <<_ACEOF #define TARGET_PREFIX "L" _ACEOF + have_sitnl="yes" ;; *-*-solaris*) @@ -5478,6 +5504,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF CPPFLAGS="$CPPFLAGS -D_XPG4_2" + test -x /bin/bash && SHELL="/bin/bash" ;; *-*-openbsd*) @@ -5945,7 +5972,6 @@ fi - for ac_prog in ifconfig do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -6174,17 +6200,17 @@ fi done test -n "$NETSTAT" || NETSTAT="netstat" # tests -for ac_prog in man2html +for ac_prog in git do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MAN2HTML+:} false; then : +if ${ac_cv_prog_GIT+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$MAN2HTML"; then - ac_cv_prog_MAN2HTML="$MAN2HTML" # Let the user override the test. + if test -n "$GIT"; then + ac_cv_prog_GIT="$GIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6193,7 +6219,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_MAN2HTML="$ac_prog" + ac_cv_prog_GIT="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6203,30 +6229,56 @@ IFS=$as_save_IFS fi fi -MAN2HTML=$ac_cv_prog_MAN2HTML -if test -n "$MAN2HTML"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAN2HTML" >&5 -$as_echo "$MAN2HTML" >&6; } +GIT=$ac_cv_prog_GIT +if test -n "$GIT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 +$as_echo "$GIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$MAN2HTML" && break + test -n "$GIT" && break done + # optional -for ac_prog in git +cat >>confdefs.h <<_ACEOF +#define IFCONFIG_PATH "$IFCONFIG" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define IPROUTE_PATH "$IPROUTE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define ROUTE_PATH "$ROUTE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SYSTEMD_ASK_PASSWORD_PATH "$SYSTEMD_ASK_PASSWORD" +_ACEOF + + +# +# man page generation - based on python-docutils +# + + +for ac_prog in rst2man rst2man.py do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GIT+:} false; then : +if ${ac_cv_prog_RST2MAN+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$GIT"; then - ac_cv_prog_GIT="$GIT" # Let the user override the test. + if test -n "$RST2MAN"; then + ac_cv_prog_RST2MAN="$RST2MAN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -6235,7 +6287,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_GIT="$ac_prog" + ac_cv_prog_RST2MAN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -6245,38 +6297,68 @@ IFS=$as_save_IFS fi fi -GIT=$ac_cv_prog_GIT -if test -n "$GIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GIT" >&5 -$as_echo "$GIT" >&6; } +RST2MAN=$ac_cv_prog_RST2MAN +if test -n "$RST2MAN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RST2MAN" >&5 +$as_echo "$RST2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$GIT" && break + test -n "$RST2MAN" && break done - # optional -cat >>confdefs.h <<_ACEOF -#define IFCONFIG_PATH "$IFCONFIG" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define IPROUTE_PATH "$IPROUTE" -_ACEOF +for ac_prog in rst2html rst2html.py +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RST2HTML+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RST2HTML"; then + ac_cv_prog_RST2HTML="$RST2HTML" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RST2HTML="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +RST2HTML=$ac_cv_prog_RST2HTML +if test -n "$RST2HTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RST2HTML" >&5 +$as_echo "$RST2HTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -cat >>confdefs.h <<_ACEOF -#define ROUTE_PATH "$ROUTE" -_ACEOF + test -n "$RST2HTML" && break +done -cat >>confdefs.h <<_ACEOF -#define SYSTEMD_ASK_PASSWORD_PATH "$SYSTEMD_ASK_PASSWORD" -_ACEOF + if test "${RST2MAN}" -a "${RST2HTML}"; then + HAVE_PYDOCUTILS_TRUE= + HAVE_PYDOCUTILS_FALSE='#' +else + HAVE_PYDOCUTILS_TRUE='#' + HAVE_PYDOCUTILS_FALSE= +fi # Set -std=c99 unless user already specified a -std= @@ -15000,7 +15082,7 @@ for ac_header in \ unistd.h signal.h libgen.h stropts.h \ syslog.h pwd.h grp.h \ sys/sockio.h sys/uio.h linux/sockios.h \ - linux/types.h sys/poll.h sys/epoll.h err.h \ + linux/types.h poll.h sys/epoll.h err.h \ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -15600,7 +15682,7 @@ for ac_func in \ ctime memset vsnprintf strdup \ setsid chdir putenv getpeername unlink \ chsize ftruncate execve getpeereid umask basename dirname access \ - epoll_create \ + epoll_create strsep \ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -16469,7 +16551,7 @@ $as_echo "yes" >&6; } have_pkcs11_helper="yes" fi -if test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "openssl"; then +if test "${with_crypto_library}" = "openssl"; then @@ -16484,12 +16566,12 @@ if test -n "$OPENSSL_CFLAGS"; then pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto >= 0.9.8, libssl >= 0.9.8\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcrypto >= 0.9.8, libssl >= 0.9.8") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openssl >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "libcrypto >= 0.9.8, libssl >= 0.9.8" 2>/dev/null` + pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -16501,12 +16583,12 @@ if test -n "$OPENSSL_LIBS"; then pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto >= 0.9.8, libssl >= 0.9.8\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libcrypto >= 0.9.8, libssl >= 0.9.8") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= 1.0.2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "openssl >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "libcrypto >= 0.9.8, libssl >= 0.9.8" 2>/dev/null` + pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl >= 1.0.2" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -16527,19 +16609,19 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcrypto >= 0.9.8, libssl >= 0.9.8" 2>&1` + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= 1.0.2" 2>&1` else - OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcrypto >= 0.9.8, libssl >= 0.9.8" 2>&1` + OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= 1.0.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENSSL_PKG_ERRORS" >&5 - have_openssl="no" # Provide if-not-found to prevent erroring out + # If this fails, we will do another test next elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - have_openssl="no" # Provide if-not-found to prevent erroring out + # If this fails, we will do another test next else OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS @@ -16548,7 +16630,6 @@ else $as_echo "yes" >&6; } have_openssl="yes" fi - OPENSSL_LIBS=${OPENSSL_LIBS:--lssl -lcrypto} fi @@ -16557,6 +16638,40 @@ fi CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}" LIBS="${LIBS} ${OPENSSL_LIBS}" + # If pkgconfig check failed or OPENSSL_CFLAGS/OPENSSL_LIBS env vars + # are used, check the version directly in the OpenSSL include file + if test "${have_openssl}" != "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking additionally if OpenSSL is available and version >= 1.0.2" >&5 +$as_echo_n "checking additionally if OpenSSL is available and version >= 1.0.2... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <openssl/opensslv.h> + +int +main () +{ + +/* Version encoding: MNNFFPPS - see opensslv.h for details */ +#if OPENSSL_VERSION_NUMBER < 0x10002000L +#error OpenSSL too old +#endif + + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } +else + as_fn_error $? "OpenSSL version too old" "$LINENO" 5 + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + for ac_func in SSL_CTX_new EVP_CIPHER_CTX_set_key_length do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -16610,22 +16725,19 @@ $as_echo "#define HAVE_OPENSSL_ENGINE 1" >>confdefs.h fi - have_crypto_aead_modes="yes" - for ac_func in EVP_aes_256_gcm -do : - ac_fn_c_check_func "$LINENO" "EVP_aes_256_gcm" "ac_cv_func_EVP_aes_256_gcm" + ac_fn_c_check_func "$LINENO" "EVP_aes_256_gcm" "ac_cv_func_EVP_aes_256_gcm" if test "x$ac_cv_func_EVP_aes_256_gcm" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_EVP_AES_256_GCM 1 -_ACEOF else - have_crypto_aead_modes="no"; break + as_fn_error $? "OpenSSL check for AES-256-GCM support failed" "$LINENO" 5 fi -done + # All supported OpenSSL version (>= 1.0.2) + # have this feature + have_export_keying_material="yes" + for ac_func in \ HMAC_CTX_new \ HMAC_CTX_free \ @@ -16634,8 +16746,10 @@ done EVP_MD_CTX_free \ EVP_MD_CTX_reset \ EVP_CIPHER_CTX_reset \ + OpenSSL_version \ SSL_CTX_get_default_passwd_cb \ SSL_CTX_get_default_passwd_cb_userdata \ + SSL_CTX_set1_groups \ SSL_CTX_set_security_level \ X509_get0_notBefore \ X509_get0_notAfter \ @@ -16643,7 +16757,6 @@ done X509_STORE_get0_objects \ X509_OBJECT_free \ X509_OBJECT_get_type \ - EVP_PKEY_id \ EVP_PKEY_get0_RSA \ EVP_PKEY_get0_DSA \ EVP_PKEY_get0_EC_KEY \ @@ -16682,13 +16795,12 @@ done CFLAGS="${saved_CFLAGS}" LIBS="${saved_LIBS}" - have_crypto="yes" $as_echo "#define ENABLE_CRYPTO_OPENSSL 1" >>confdefs.h CRYPTO_CFLAGS="${OPENSSL_CFLAGS}" CRYPTO_LIBS="${OPENSSL_LIBS}" -elif test "${enable_crypto}" = "yes" -a "${with_crypto_library}" = "mbedtls"; then +elif test "${with_crypto_library}" = "mbedtls"; then @@ -16775,49 +16887,6 @@ else fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - mbedtls_with_pkcs11="no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <mbedtls/config.h> - -int -main () -{ - -#ifndef MBEDTLS_PKCS11_C -#error pkcs11 wrapper missing -#endif - - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - mbedtls_with_pkcs11="yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking mbedtls pkcs11 support" >&5 -$as_echo_n "checking mbedtls pkcs11 support... " >&6; } - if test "${enable_pkcs11}" = "yes"; then - if test "${mbedtls_with_pkcs11}" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - else - as_fn_error $? "mbedtls has no pkcs11 wrapper compiled in" "$LINENO" 5 - fi - else - if test "${mbedtls_with_pkcs11}" != "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } - else - as_fn_error $? "mbed TLS compiled with PKCS11, while OpenVPN is not" "$LINENO" 5 - fi - fi - - have_crypto_aead_modes="yes" for ac_func in \ mbedtls_cipher_write_tag \ mbedtls_cipher_check_tag \ @@ -16831,21 +16900,30 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then : _ACEOF else - have_crypto_aead_modes="no"; break + as_fn_error $? "mbed TLS check for AEAD support failed" "$LINENO" 5 fi done + have_export_keying_material="yes" + ac_fn_c_check_func "$LINENO" "mbedtls_ssl_conf_export_keys_ext_cb" "ac_cv_func_mbedtls_ssl_conf_export_keys_ext_cb" +if test "x$ac_cv_func_mbedtls_ssl_conf_export_keys_ext_cb" = xyes; then : + +else + have_export_keying_material="no" + +fi + + CFLAGS="${saved_CFLAGS}" LIBS="${saved_LIBS}" - have_crypto="yes" $as_echo "#define ENABLE_CRYPTO_MBEDTLS 1" >>confdefs.h CRYPTO_CFLAGS="${MBEDTLS_CFLAGS}" CRYPTO_LIBS="${MBEDTLS_LIBS}" -elif test "${enable_crypto}" = "yes"; then +else as_fn_error $? "Invalid crypto library: ${with_crypto_library}" "$LINENO" 5 fi @@ -17638,9 +17716,6 @@ fi test "${ac_cv_header_sys_uio_h}" = "yes" && $as_echo "#define HAVE_IOVEC 1" >>confdefs.h -test "${enable_server}" = "no" && -$as_echo "#define ENABLE_CLIENT_ONLY 1" >>confdefs.h - test "${enable_management}" = "yes" && $as_echo "#define ENABLE_MANAGEMENT 1" >>confdefs.h @@ -17669,20 +17744,16 @@ test "${enable_strict_options}" = "yes" && $as_echo "#define ENABLE_STRICT_OPTIONS_CHECK 1" >>confdefs.h -if test "${enable_crypto}" = "yes"; then - test "${have_crypto}" != "yes" && as_fn_error $? "${with_crypto_library} crypto is required but missing" "$LINENO" 5 - test "${enable_crypto_ofb_cfb}" = "yes" && +test "${enable_crypto_ofb_cfb}" = "yes" && $as_echo "#define ENABLE_OFB_CFB_MODE 1" >>confdefs.h - test "${have_crypto_aead_modes}" = "yes" && -$as_echo "#define HAVE_AEAD_CIPHER_MODES 1" >>confdefs.h +if test "${have_export_keying_material}" = "yes"; then - OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CFLAGS}" - OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_LIBS}" - -$as_echo "#define ENABLE_CRYPTO 1" >>confdefs.h +$as_echo "#define HAVE_EXPORT_KEYING_MATERIAL 1" >>confdefs.h fi +OPTIONAL_CRYPTO_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${CRYPTO_CFLAGS}" +OPTIONAL_CRYPTO_LIBS="${OPTIONAL_CRYPTO_LIBS} ${CRYPTO_LIBS}" if test "${enable_plugins}" = "yes"; then OPTIONAL_DL_LIBS="${DL_LIBS}" @@ -17694,16 +17765,37 @@ else enable_plugin_down_root="no" fi + if false; then + HAVE_SITNL_TRUE= + HAVE_SITNL_FALSE='#' +else + HAVE_SITNL_TRUE='#' + HAVE_SITNL_FALSE= +fi + + if test "${enable_iproute2}" = "yes"; then test -z "${IPROUTE}" && as_fn_error $? "ip utility is required but missing" "$LINENO" 5 $as_echo "#define ENABLE_IPROUTE 1" >>confdefs.h +else if test "${have_sitnl}" = "yes"; then + +$as_echo "#define ENABLE_SITNL 1" >>confdefs.h + + if true; then + HAVE_SITNL_TRUE= + HAVE_SITNL_FALSE='#' else - if test "${WIN32}" != "yes"; then - test -z "${ROUTE}" && as_fn_error $? "route utility is required but missing" "$LINENO" 5 - test -z "${IFCONFIG}" && as_fn_error $? "ifconfig utility is required but missing" "$LINENO" 5 - fi + HAVE_SITNL_TRUE='#' + HAVE_SITNL_FALSE= +fi + +else if test "${WIN32}" != "yes" -a "${have_sitnl}" != "yes"; then + test -z "${ROUTE}" && as_fn_error $? "route utility is required but missing" "$LINENO" 5 + test -z "${IFCONFIG}" && as_fn_error $? "ifconfig utility is required but missing" "$LINENO" 5 +fi +fi fi if test "${enable_selinux}" = "yes"; then @@ -17732,7 +17824,6 @@ fi if test "${enable_pkcs11}" = "yes"; then test "${have_pkcs11_helper}" != "yes" && as_fn_error $? "PKCS11 enabled but libpkcs11-helper is missing" "$LINENO" 5 - test "${enable_crypto}" != "yes" && as_fn_error $? "PKCS11 can be enabled only if crypto is enabled" "$LINENO" 5 OPTIONAL_PKCS11_HELPER_CFLAGS="${PKCS11_HELPER_CFLAGS}" OPTIONAL_PKCS11_HELPER_LIBS="${PKCS11_HELPER_LIBS}" @@ -17818,13 +17909,16 @@ _ACEOF fi fi +# When testing a compiler option, we add -Werror to force +# an error when the option is unsupported. This is not +# required for gcc, but some compilers such as clang needs it. old_cflags="$CFLAGS" - CFLAGS="-Wno-unused-function $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler acceppts -Wno-unused-function" >&5 -$as_echo_n "checking whether the compiler acceppts -Wno-unused-function... " >&6; } + CFLAGS="-Wno-stringop-truncation -Werror $CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wno-stringop-truncation" >&5 +$as_echo_n "checking whether the compiler accepts -Wno-stringop-truncation... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17838,7 +17932,7 @@ main () _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +$as_echo "yes" >&6; }; CFLAGS="-Wno-stringop-truncation $old_cflags" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; CFLAGS="$old_cflags" @@ -17847,9 +17941,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext old_cflags="$CFLAGS" - CFLAGS="-Wno-unused-parameter $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler acceppts -Wno-unused-parameter" >&5 -$as_echo_n "checking whether the compiler acceppts -Wno-unused-parameter... " >&6; } + CFLAGS="-Wno-unused-function -Werror $CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wno-unused-function" >&5 +$as_echo_n "checking whether the compiler accepts -Wno-unused-function... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17863,7 +17957,7 @@ main () _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +$as_echo "yes" >&6; }; CFLAGS="-Wno-unused-function $old_cflags" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; CFLAGS="$old_cflags" @@ -17872,9 +17966,9 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext old_cflags="$CFLAGS" - CFLAGS="-Wall $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler acceppts -Wall" >&5 -$as_echo_n "checking whether the compiler acceppts -Wall... " >&6; } + CFLAGS="-Wno-unused-parameter -Werror $CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wno-unused-parameter" >&5 +$as_echo_n "checking whether the compiler accepts -Wno-unused-parameter... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17888,7 +17982,32 @@ main () _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +$as_echo "yes" >&6; }; CFLAGS="-Wno-unused-parameter $old_cflags" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; CFLAGS="$old_cflags" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + old_cflags="$CFLAGS" + CFLAGS="-Wall -Werror $CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler accepts -Wall" >&5 +$as_echo_n "checking whether the compiler accepts -Wall... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; CFLAGS="-Wall $old_cflags" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; CFLAGS="$old_cflags" @@ -17910,10 +18029,6 @@ if test "${enable_werror}" = "yes"; then CFLAGS="${CFLAGS} -Werror" fi -if test "${WIN32}" = "yes"; then - test -z "${MAN2HTML}" && as_fn_error $? "man2html is required for win32" "$LINENO" 5 -fi - if test "${enable_plugin_auth_pam}" = "yes"; then PLUGIN_AUTH_PAM_CFLAGS="${LIBPAM_CFLAGS}" if test "${enable_pam_dlopen}" = "yes"; then @@ -18129,14 +18244,6 @@ else ENABLE_PLUGIN_DOWN_ROOT_FALSE= fi - if test "${enable_crypto}" = "yes"; then - ENABLE_CRYPTO_TRUE= - ENABLE_CRYPTO_FALSE='#' -else - ENABLE_CRYPTO_TRUE='#' - ENABLE_CRYPTO_FALSE= -fi - if test "${have_ld_wrap_support}" = "yes"; then HAVE_LD_WRAP_SUPPORT_TRUE= HAVE_LD_WRAP_SUPPORT_FALSE='#' @@ -18145,6 +18252,14 @@ else HAVE_LD_WRAP_SUPPORT_FALSE= fi + if test "${have_openssl_engine}" = "yes"; then + OPENSSL_ENGINE_TRUE= + OPENSSL_ENGINE_FALSE='#' +else + OPENSSL_ENGINE_TRUE='#' + OPENSSL_ENGINE_FALSE= +fi + sampledir="\$(docdir)/sample" @@ -18153,93 +18268,111 @@ sampledir="\$(docdir)/sample" -TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS} -lcmocka -L\$(top_builddir)/vendor/dist/lib -Wl,-rpath,\$(top_builddir)/vendor/dist/lib" -TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_HELPER_CFLAGS} -I\$(top_srcdir)/include -I\$(top_builddir)/vendor/dist/include" +# Check whether --enable-unit-tests was given. +if test "${enable_unit_tests+set}" = set; then : + enableval=$enable_unit_tests; +else + enable_unit_tests="yes" +fi +# Check if cmocka is available - needed for unit testing -# Check if cmake is available and cmocka git submodule is initialized, -# needed for unit testing -for ac_prog in cmake -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CMAKE+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CMAKE"; then - ac_cv_prog_CMAKE="$CMAKE" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CMAKE="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMOCKA" >&5 +$as_echo_n "checking for CMOCKA... " >&6; } +if test -n "$CMOCKA_CFLAGS"; then + pkg_cv_CMOCKA_CFLAGS="$CMOCKA_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cmocka\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cmocka") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CMOCKA_CFLAGS=`$PKG_CONFIG --cflags "cmocka" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes fi + else + pkg_failed=untried fi -CMAKE=$ac_cv_prog_CMAKE -if test -n "$CMAKE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMAKE" >&5 -$as_echo "$CMAKE" >&6; } +if test -n "$CMOCKA_LIBS"; then + pkg_cv_CMOCKA_LIBS="$CMOCKA_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cmocka\""; } >&5 + ($PKG_CONFIG --exists --print-errors "cmocka") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_CMOCKA_LIBS=`$PKG_CONFIG --libs "cmocka" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + pkg_failed=yes +fi + else + pkg_failed=untried fi - test -n "$CMAKE" && break -done -if test -n "${CMAKE}"; then - if test -f "${srcdir}/vendor/cmocka/CMakeLists.txt"; then - if true; then - CMOCKA_INITIALIZED_TRUE= - CMOCKA_INITIALIZED_FALSE='#' -else - CMOCKA_INITIALIZED_TRUE='#' - CMOCKA_INITIALIZED_FALSE= -fi +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - else - if false; then - CMOCKA_INITIALIZED_TRUE= - CMOCKA_INITIALIZED_FALSE='#' +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - CMOCKA_INITIALIZED_TRUE='#' - CMOCKA_INITIALIZED_FALSE= + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + CMOCKA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cmocka" 2>&1` + else + CMOCKA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cmocka" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$CMOCKA_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cmocka.pc not found on the system. Unit tests disabled" >&5 +$as_echo "$as_me: WARNING: cmocka.pc not found on the system. Unit tests disabled" >&2;} + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cmocka.pc not found on the system. Unit tests disabled" >&5 +$as_echo "$as_me: WARNING: cmocka.pc not found on the system. Unit tests disabled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: result: !! WARNING !! The cmoka git submodule has not been initialized or updated. Unit testing cannot be performed." >&5 -$as_echo "!! WARNING !! The cmoka git submodule has not been initialized or updated. Unit testing cannot be performed." >&6; } - fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: !! WARNING !! CMake is NOT available. Unit testing cannot be performed." >&5 -$as_echo "!! WARNING !! CMake is NOT available. Unit testing cannot be performed." >&6; } - if false; then - CMOCKA_INITIALIZED_TRUE= - CMOCKA_INITIALIZED_FALSE='#' + CMOCKA_CFLAGS=$pkg_cv_CMOCKA_CFLAGS + CMOCKA_LIBS=$pkg_cv_CMOCKA_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + have_cmocka="yes" +fi + if test "${enable_unit_tests}" = "yes" -a "${have_cmocka}" = "yes" ; then + ENABLE_UNITTESTS_TRUE= + ENABLE_UNITTESTS_FALSE='#' else - CMOCKA_INITIALIZED_TRUE='#' - CMOCKA_INITIALIZED_FALSE= + ENABLE_UNITTESTS_TRUE='#' + ENABLE_UNITTESTS_FALSE= fi -fi -ac_config_files="$ac_config_files version.sh Makefile build/Makefile build/msvc/Makefile build/msvc/msvc-generate/Makefile distro/Makefile distro/systemd/Makefile include/Makefile src/Makefile src/compat/Makefile src/openvpn/Makefile src/openvpnserv/Makefile src/plugins/Makefile src/plugins/auth-pam/Makefile src/plugins/down-root/Makefile tests/Makefile tests/unit_tests/Makefile tests/unit_tests/example_test/Makefile tests/unit_tests/openvpn/Makefile tests/unit_tests/plugins/Makefile tests/unit_tests/plugins/auth-pam/Makefile vendor/Makefile sample/Makefile doc/Makefile" +TEST_LDFLAGS="${OPTIONAL_CRYPTO_LIBS} ${OPTIONAL_PKCS11_HELPER_LIBS}" +TEST_LDFLAGS="${TEST_LDFLAGS} ${OPTIONAL_LZO_LIBS} ${CMOCKA_LIBS}" +TEST_CFLAGS="${OPTIONAL_CRYPTO_CFLAGS} ${OPTIONAL_PKCS11_HELPER_CFLAGS}" +TEST_CFLAGS="${TEST_CFLAGS} ${OPTIONAL_LZO_CFLAGS}" +TEST_CFLAGS="${TEST_CFLAGS} -I\$(top_srcdir)/include ${CMOCKA_CFLAGS}" + + + + +ac_config_files="$ac_config_files version.sh Makefile build/Makefile build/msvc/Makefile build/msvc/msvc-generate/Makefile distro/Makefile distro/systemd/Makefile doc/Makefile doc/doxygen/Makefile doc/doxygen/openvpn.doxyfile include/Makefile sample/sample-plugins/Makefile src/Makefile src/compat/Makefile src/openvpn/Makefile src/openvpnmsica/Makefile src/openvpnserv/Makefile src/plugins/Makefile src/plugins/auth-pam/Makefile src/plugins/down-root/Makefile src/tapctl/Makefile tests/Makefile tests/unit_tests/Makefile tests/unit_tests/example_test/Makefile tests/unit_tests/openvpn/Makefile tests/unit_tests/plugins/Makefile tests/unit_tests/plugins/auth-pam/Makefile tests/unit_tests/engine-key/Makefile sample/Makefile" ac_config_files="$ac_config_files tests/t_client.sh" @@ -18376,10 +18509,30 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${TARGET_LINUX_TRUE}" && test -z "${TARGET_LINUX_FALSE}"; then + as_fn_error $? "conditional \"TARGET_LINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${TARGET_LINUX_TRUE}" && test -z "${TARGET_LINUX_FALSE}"; then + as_fn_error $? "conditional \"TARGET_LINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_PYDOCUTILS_TRUE}" && test -z "${HAVE_PYDOCUTILS_FALSE}"; then + as_fn_error $? "conditional \"HAVE_PYDOCUTILS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_SYSTEMD_TRUE}" && test -z "${ENABLE_SYSTEMD_FALSE}"; then as_fn_error $? "conditional \"ENABLE_SYSTEMD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_SITNL_TRUE}" && test -z "${HAVE_SITNL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SITNL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SITNL_TRUE}" && test -z "${HAVE_SITNL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SITNL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then as_fn_error $? "conditional \"WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18396,24 +18549,16 @@ if test -z "${ENABLE_PLUGIN_DOWN_ROOT_TRUE}" && test -z "${ENABLE_PLUGIN_DOWN_RO as_fn_error $? "conditional \"ENABLE_PLUGIN_DOWN_ROOT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${ENABLE_CRYPTO_TRUE}" && test -z "${ENABLE_CRYPTO_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_CRYPTO\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_LD_WRAP_SUPPORT_TRUE}" && test -z "${HAVE_LD_WRAP_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAVE_LD_WRAP_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${CMOCKA_INITIALIZED_TRUE}" && test -z "${CMOCKA_INITIALIZED_FALSE}"; then - as_fn_error $? "conditional \"CMOCKA_INITIALIZED\" was never defined. +if test -z "${OPENSSL_ENGINE_TRUE}" && test -z "${OPENSSL_ENGINE_FALSE}"; then + as_fn_error $? "conditional \"OPENSSL_ENGINE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${CMOCKA_INITIALIZED_TRUE}" && test -z "${CMOCKA_INITIALIZED_FALSE}"; then - as_fn_error $? "conditional \"CMOCKA_INITIALIZED\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${CMOCKA_INITIALIZED_TRUE}" && test -z "${CMOCKA_INITIALIZED_FALSE}"; then - as_fn_error $? "conditional \"CMOCKA_INITIALIZED\" was never defined. +if test -z "${ENABLE_UNITTESTS_TRUE}" && test -z "${ENABLE_UNITTESTS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_UNITTESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi @@ -18813,7 +18958,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenVPN $as_me 2.4.9, which was +This file was extended by OpenVPN $as_me 2.5.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18879,7 +19024,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -OpenVPN config.status 2.4.9 +OpenVPN config.status 2.5.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -19378,23 +19523,28 @@ do "build/msvc/msvc-generate/Makefile") CONFIG_FILES="$CONFIG_FILES build/msvc/msvc-generate/Makefile" ;; "distro/Makefile") CONFIG_FILES="$CONFIG_FILES distro/Makefile" ;; "distro/systemd/Makefile") CONFIG_FILES="$CONFIG_FILES distro/systemd/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES doc/doxygen/Makefile" ;; + "doc/doxygen/openvpn.doxyfile") CONFIG_FILES="$CONFIG_FILES doc/doxygen/openvpn.doxyfile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "sample/sample-plugins/Makefile") CONFIG_FILES="$CONFIG_FILES sample/sample-plugins/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/compat/Makefile") CONFIG_FILES="$CONFIG_FILES src/compat/Makefile" ;; "src/openvpn/Makefile") CONFIG_FILES="$CONFIG_FILES src/openvpn/Makefile" ;; + "src/openvpnmsica/Makefile") CONFIG_FILES="$CONFIG_FILES src/openvpnmsica/Makefile" ;; "src/openvpnserv/Makefile") CONFIG_FILES="$CONFIG_FILES src/openvpnserv/Makefile" ;; "src/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/Makefile" ;; "src/plugins/auth-pam/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/auth-pam/Makefile" ;; "src/plugins/down-root/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/down-root/Makefile" ;; + "src/tapctl/Makefile") CONFIG_FILES="$CONFIG_FILES src/tapctl/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/unit_tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit_tests/Makefile" ;; "tests/unit_tests/example_test/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit_tests/example_test/Makefile" ;; "tests/unit_tests/openvpn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit_tests/openvpn/Makefile" ;; "tests/unit_tests/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit_tests/plugins/Makefile" ;; "tests/unit_tests/plugins/auth-pam/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit_tests/plugins/auth-pam/Makefile" ;; - "vendor/Makefile") CONFIG_FILES="$CONFIG_FILES vendor/Makefile" ;; + "tests/unit_tests/engine-key/Makefile") CONFIG_FILES="$CONFIG_FILES tests/unit_tests/engine-key/Makefile" ;; "sample/Makefile") CONFIG_FILES="$CONFIG_FILES sample/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "tests/t_client.sh") CONFIG_FILES="$CONFIG_FILES tests/t_client.sh" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -20073,7 +20223,9 @@ $as_echo X/"$am_mf" | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } |