Parcourir la source

package/softether: remove package

Due to the increasing number of patches applied for this package and the
lack of updates to fix the build issues as well as updating the version
to newer release. This patch removes softether from buildroot package
list.

Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Thomas Perale il y a 4 mois
Parent
commit
802392055a

+ 0 - 9
.checkpackageignore

@@ -925,15 +925,6 @@ package/snort/0005-fix-sparc.patch lib_patch.Upstream
 package/snort/0006-Fix-compile-error-when-building-against-uclibc-or-mu.patch lib_patch.Upstream
 package/snort/0007-Fix-error-when-building-on-a-Fedora-host-machine.patch lib_patch.Upstream
 package/snort/0008-Fix-NO-OPTIMIZE.patch lib_patch.Upstream
-package/softether/0001-Create-autotools-plumbing-for-SoftEther.patch lib_patch.Upstream
-package/softether/0002-Create-libsoftether.so-and-dynamically-link.patch lib_patch.Upstream
-package/softether/0003-use-fhs-install-directories.patch lib_patch.Upstream
-package/softether/0004-create-non-forking-softetherd-for-upstart-and-systemd.patch lib_patch.Upstream
-package/softether/0005-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch lib_patch.Upstream
-package/softether/0006-cross-compile.patch lib_patch.Upstream
-package/softether/0007-iconv.patch lib_patch.Upstream
-package/softether/0008-librt.patch lib_patch.Upstream
-package/softether/0009-uclibc-ai-addrconfig.patch lib_patch.Upstream
 package/solarus/0001-cmake-remove-Werror.patch lib_patch.Upstream
 package/solarus/0002-Add-a-basic-FindOpenGLES2.cmake.patch lib_patch.Sob lib_patch.Upstream
 package/sox/0001-Make-SoX-support-uclibc-based-toolchains.patch lib_patch.Upstream

+ 8 - 0
Config.in.legacy

@@ -146,6 +146,14 @@ endif
 
 comment "Legacy options removed in 2026.02"
 
+config BR2_PACKAGE_SOFTETHER
+	bool "softether has been removed"
+	select BR2_LEGACY
+	help
+	  The version packaged in Buildroot version was outdated
+	  compared to upstream and no longer maintained by anyone
+	  listed in the DEVELOPERS file.
+
 config BR2_PACKAGE_RPI_USERLAND
 	bool "rpi-userland has been removed"
 	select BR2_LEGACY

+ 0 - 1
package/Config.in

@@ -2638,7 +2638,6 @@ endif
 	source "package/snort3/Config.in"
 	source "package/socat/Config.in"
 	source "package/socketcand/Config.in"
-	source "package/softether/Config.in"
 	source "package/spawn-fcgi/Config.in"
 	source "package/spice/Config.in"
 	source "package/spice-protocol/Config.in"

+ 0 - 2107
package/softether/0001-Create-autotools-plumbing-for-SoftEther.patch

@@ -1,2107 +0,0 @@
-From c5e5d7e93c6f3302adf5821c29c4efdb7630e418 Mon Sep 17 00:00:00 2001
-From: Darik Horn <dajhorn@vanadac.com>
-Date: Sat, 12 Apr 2014 17:46:04 -0400
-Subject: [PATCH] Create autotools plumbing for SoftEther.
-
-Add autoconf and automake capabilities to SoftEther so that it can be built
-like this:
-
-	# autoreconf --force --install
-	# ./configure
-	# make install DESTDIR=/tmp/softether
-
-All standard configure parameters are supported, plus:
-
-	# ./configure --enable-debug
-
-Autotools support makes porting, cross compiling, and optimization much easier.
-
-These GNU autoconf-archive components are used for dependency checking:
-
-  * ax_check_openssl.m4
-  * ax_check_zlib.m4
-  * ax_lib_readline.m4
-  * ax_pthread.m4
-  * ax_with_curses.m4
-
-NB: http://www.gnu.org/software/autoconf-archive/
-
-[Upstream commit: https://github.com/dajhorn/SoftEtherVPN/commit/c5e5d7e93c6f3302adf5821c29c4efdb7630e418]
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-[Fabrice: update for 4.30-9700-beta]
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- Makefile.am                    |  21 ++
- autotools/ax_check_openssl.m4  | 124 ++++++++++
- autotools/ax_check_zlib.m4     | 142 +++++++++++
- autotools/ax_lib_readline.m4   | 107 +++++++++
- autotools/ax_pthread.m4        | 332 ++++++++++++++++++++++++++
- autotools/ax_with_curses.m4    | 518 +++++++++++++++++++++++++++++++++++++++++
- autotools/softether.am         |  39 ++++
- configure.ac                   |  96 ++++++++
- configure => manual_configure  |   0
- src/Cedar/Makefile.am          |  82 +++++++
- src/Makefile.am                |  26 +++
- src/Mayaqua/Makefile.am        |  43 ++++
- src/bin/hamcore/Makefile.am    |  29 +++
- src/hamcorebuilder/Makefile.am |  29 +++
- src/vpnbridge/Makefile.am      |  29 +++
- src/vpnclient/Makefile.am      |  29 +++
- src/vpncmd/Makefile.am         |  29 +++
- src/vpnserver/Makefile.am      |  29 +++
- 18 files changed, 1704 insertions(+)
- create mode 100644 Makefile.am
- create mode 100644 autotools/ax_check_openssl.m4
- create mode 100644 autotools/ax_check_zlib.m4
- create mode 100644 autotools/ax_lib_readline.m4
- create mode 100644 autotools/ax_pthread.m4
- create mode 100644 autotools/ax_with_curses.m4
- create mode 100644 autotools/softether.am
- create mode 100644 configure.ac
- rename configure => manual_configure (100%)
- create mode 100644 src/Cedar/Makefile.am
- create mode 100644 src/Makefile.am
- create mode 100644 src/Mayaqua/Makefile.am
- create mode 100644 src/bin/hamcore/Makefile.am
- create mode 100644 src/hamcorebuilder/Makefile.am
- create mode 100644 src/vpnbridge/Makefile.am
- create mode 100644 src/vpnclient/Makefile.am
- create mode 100644 src/vpncmd/Makefile.am
- create mode 100644 src/vpnserver/Makefile.am
-
-diff --git a/Makefile.am b/Makefile.am
-new file mode 100644
-index 00000000..aa73b2ba
---- /dev/null
-+++ b/Makefile.am
-@@ -0,0 +1,21 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+ACLOCAL_AMFLAGS = -I autotools
-+include $(top_srcdir)/autotools/softether.am
-+SUBDIRS = src
-diff --git a/autotools/ax_check_openssl.m4 b/autotools/ax_check_openssl.m4
-new file mode 100644
-index 00000000..a87c5a6b
---- /dev/null
-+++ b/autotools/ax_check_openssl.m4
-@@ -0,0 +1,124 @@
-+# ===========================================================================
-+#     http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
-+#
-+# DESCRIPTION
-+#
-+#   Look for OpenSSL in a number of default spots, or in a user-selected
-+#   spot (via --with-openssl).  Sets
-+#
-+#     OPENSSL_INCLUDES to the include directives required
-+#     OPENSSL_LIBS to the -l directives required
-+#     OPENSSL_LDFLAGS to the -L or -R flags required
-+#
-+#   and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
-+#
-+#   This macro sets OPENSSL_INCLUDES such that source files should use the
-+#   openssl/ directory in include directives:
-+#
-+#     #include <openssl/hmac.h>
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
-+#   Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
-+#
-+#   Copying and distribution of this file, with or without modification, are
-+#   permitted in any medium without royalty provided the copyright notice
-+#   and this notice are preserved. This file is offered as-is, without any
-+#   warranty.
-+
-+#serial 8
-+
-+AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
-+AC_DEFUN([AX_CHECK_OPENSSL], [
-+    found=false
-+    AC_ARG_WITH([openssl],
-+        [AS_HELP_STRING([--with-openssl=DIR],
-+            [root of the OpenSSL directory])],
-+        [
-+            case "$withval" in
-+            "" | y | ye | yes | n | no)
-+            AC_MSG_ERROR([Invalid --with-openssl value])
-+              ;;
-+            *) ssldirs="$withval"
-+              ;;
-+            esac
-+        ], [
-+            # if pkg-config is installed and openssl has installed a .pc file,
-+            # then use that information and don't search ssldirs
-+            AC_PATH_PROG([PKG_CONFIG], [pkg-config])
-+            if test x"$PKG_CONFIG" != x""; then
-+                OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
-+                if test $? = 0; then
-+                    OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
-+                    OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
-+                    found=true
-+                fi
-+            fi
-+
-+            # no such luck; use some default ssldirs
-+            if ! $found; then
-+                ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
-+            fi
-+        ]
-+        )
-+
-+
-+    # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
-+    # an 'openssl' subdirectory
-+
-+    if ! $found; then
-+        OPENSSL_INCLUDES=
-+        for ssldir in $ssldirs; do
-+            AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
-+            if test -f "$ssldir/include/openssl/ssl.h"; then
-+                OPENSSL_INCLUDES="-I$ssldir/include"
-+                OPENSSL_LDFLAGS="-L$ssldir/lib"
-+                OPENSSL_LIBS="-lssl -lcrypto"
-+                found=true
-+                AC_MSG_RESULT([yes])
-+                break
-+            else
-+                AC_MSG_RESULT([no])
-+            fi
-+        done
-+
-+        # if the file wasn't found, well, go ahead and try the link anyway -- maybe
-+        # it will just work!
-+    fi
-+
-+    # try the preprocessor and linker with our new flags,
-+    # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
-+
-+    AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
-+    echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
-+        "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
-+
-+    save_LIBS="$LIBS"
-+    save_LDFLAGS="$LDFLAGS"
-+    save_CPPFLAGS="$CPPFLAGS"
-+    LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
-+    LIBS="$OPENSSL_LIBS $LIBS"
-+    CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
-+    AC_LINK_IFELSE(
-+        [AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
-+        [
-+            AC_MSG_RESULT([yes])
-+            $1
-+        ], [
-+            AC_MSG_RESULT([no])
-+            $2
-+        ])
-+    CPPFLAGS="$save_CPPFLAGS"
-+    LDFLAGS="$save_LDFLAGS"
-+    LIBS="$save_LIBS"
-+
-+    AC_SUBST([OPENSSL_INCLUDES])
-+    AC_SUBST([OPENSSL_LIBS])
-+    AC_SUBST([OPENSSL_LDFLAGS])
-+])
-diff --git a/autotools/ax_check_zlib.m4 b/autotools/ax_check_zlib.m4
-new file mode 100644
-index 00000000..ae5705f6
---- /dev/null
-+++ b/autotools/ax_check_zlib.m4
-@@ -0,0 +1,142 @@
-+# ===========================================================================
-+#       http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_CHECK_ZLIB([action-if-found], [action-if-not-found])
-+#
-+# DESCRIPTION
-+#
-+#   This macro searches for an installed zlib library. If nothing was
-+#   specified when calling configure, it searches first in /usr/local and
-+#   then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified,
-+#   it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If
-+#   --without-zlib is specified, the library is not searched at all.
-+#
-+#   If either the header file (zlib.h) or the library (libz) is not found,
-+#   shell commands 'action-if-not-found' is run. If 'action-if-not-found' is
-+#   not specified, the configuration exits on error, asking for a valid zlib
-+#   installation directory or --without-zlib.
-+#
-+#   If both header file and library are found, shell commands
-+#   'action-if-found' is run. If 'action-if-found' is not specified, the
-+#   default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends
-+#   '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls
-+#   AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition
-+#   for this symbol in a config.h file. Sample usage in a C/C++ source is as
-+#   follows:
-+#
-+#     #ifdef HAVE_LIBZ
-+#     #include <zlib.h>
-+#     #endif /* HAVE_LIBZ */
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2008 Loic Dachary <loic@senga.org>
-+#   Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org>
-+#
-+#   This program is free software; you can redistribute it and/or modify it
-+#   under the terms of the GNU General Public License as published by the
-+#   Free Software Foundation; either version 2 of the License, or (at your
-+#   option) any later version.
-+#
-+#   This program is distributed in the hope that it will be useful, but
-+#   WITHOUT ANY WARRANTY; without even the implied warranty of
-+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+#   Public License for more details.
-+#
-+#   You should have received a copy of the GNU General Public License along
-+#   with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+#   As a special exception, the respective Autoconf Macro's copyright owner
-+#   gives unlimited permission to copy, distribute and modify the configure
-+#   scripts that are the output of Autoconf when processing the Macro. You
-+#   need not follow the terms of the GNU General Public License when using
-+#   or distributing such scripts, even though portions of the text of the
-+#   Macro appear in them. The GNU General Public License (GPL) does govern
-+#   all other use of the material that constitutes the Autoconf Macro.
-+#
-+#   This special exception to the GPL applies to versions of the Autoconf
-+#   Macro released by the Autoconf Archive. When you make and distribute a
-+#   modified version of the Autoconf Macro, you may extend this special
-+#   exception to the GPL to apply to your modified version as well.
-+
-+#serial 14
-+
-+AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB])
-+AC_DEFUN([AX_CHECK_ZLIB],
-+#
-+# Handle user hints
-+#
-+[AC_MSG_CHECKING(if zlib is wanted)
-+zlib_places="/usr/local /usr /opt/local /sw"
-+AC_ARG_WITH([zlib],
-+[  --with-zlib=DIR         root directory path of zlib installation @<:@defaults to
-+                          /usr/local or /usr if not found in /usr/local@:>@
-+  --without-zlib          to disable zlib usage completely],
-+[if test "$withval" != no ; then
-+  AC_MSG_RESULT(yes)
-+  if test -d "$withval"
-+  then
-+    zlib_places="$withval $zlib_places"
-+  else
-+    AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
-+  fi
-+else
-+  zlib_places=
-+  AC_MSG_RESULT(no)
-+fi],
-+[AC_MSG_RESULT(yes)])
-+
-+#
-+# Locate zlib, if wanted
-+#
-+if test -n "${zlib_places}"
-+then
-+	# check the user supplied or any other more or less 'standard' place:
-+	#   Most UNIX systems      : /usr/local and /usr
-+	#   MacPorts / Fink on OSX : /opt/local respectively /sw
-+	for ZLIB_HOME in ${zlib_places} ; do
-+	  if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi
-+	  ZLIB_HOME=""
-+	done
-+
-+  ZLIB_OLD_LDFLAGS=$LDFLAGS
-+  ZLIB_OLD_CPPFLAGS=$CPPFLAGS
-+  if test -n "${ZLIB_HOME}"; then
-+        LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
-+        CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
-+  fi
-+  AC_LANG_SAVE
-+  AC_LANG_C
-+  AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no])
-+  AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no])
-+  AC_LANG_RESTORE
-+  if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes"
-+  then
-+    #
-+    # If both library and header were found, action-if-found
-+    #
-+    m4_ifblank([$1],[
-+                CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
-+                LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
-+                LIBS="-lz $LIBS"
-+                AC_DEFINE([HAVE_LIBZ], [1],
-+                          [Define to 1 if you have `z' library (-lz)])
-+               ],[
-+                # Restore variables
-+                LDFLAGS="$ZLIB_OLD_LDFLAGS"
-+                CPPFLAGS="$ZLIB_OLD_CPPFLAGS"
-+                $1
-+               ])
-+  else
-+    #
-+    # If either header or library was not found, action-if-not-found
-+    #
-+    m4_default([$2],[
-+                AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib])
-+                ])
-+  fi
-+fi
-+])
-diff --git a/autotools/ax_lib_readline.m4 b/autotools/ax_lib_readline.m4
-new file mode 100644
-index 00000000..056f25c2
---- /dev/null
-+++ b/autotools/ax_lib_readline.m4
-@@ -0,0 +1,107 @@
-+# ===========================================================================
-+#      http://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_LIB_READLINE
-+#
-+# DESCRIPTION
-+#
-+#   Searches for a readline compatible library. If found, defines
-+#   `HAVE_LIBREADLINE'. If the found library has the `add_history' function,
-+#   sets also `HAVE_READLINE_HISTORY'. Also checks for the locations of the
-+#   necessary include files and sets `HAVE_READLINE_H' or
-+#   `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
-+#   'HAVE_HISTORY_H' if the corresponding include files exists.
-+#
-+#   The libraries that may be readline compatible are `libedit',
-+#   `libeditline' and `libreadline'. Sometimes we need to link a termcap
-+#   library for readline to work, this macro tests these cases too by trying
-+#   to link with `libtermcap', `libcurses' or `libncurses' before giving up.
-+#
-+#   Here is an example of how to use the information provided by this macro
-+#   to perform the necessary includes or declarations in a C file:
-+#
-+#     #ifdef HAVE_LIBREADLINE
-+#     #  if defined(HAVE_READLINE_READLINE_H)
-+#     #    include <readline/readline.h>
-+#     #  elif defined(HAVE_READLINE_H)
-+#     #    include <readline.h>
-+#     #  else /* !defined(HAVE_READLINE_H) */
-+#     extern char *readline ();
-+#     #  endif /* !defined(HAVE_READLINE_H) */
-+#     char *cmdline = NULL;
-+#     #else /* !defined(HAVE_READLINE_READLINE_H) */
-+#       /* no readline */
-+#     #endif /* HAVE_LIBREADLINE */
-+#
-+#     #ifdef HAVE_READLINE_HISTORY
-+#     #  if defined(HAVE_READLINE_HISTORY_H)
-+#     #    include <readline/history.h>
-+#     #  elif defined(HAVE_HISTORY_H)
-+#     #    include <history.h>
-+#     #  else /* !defined(HAVE_HISTORY_H) */
-+#     extern void add_history ();
-+#     extern int write_history ();
-+#     extern int read_history ();
-+#     #  endif /* defined(HAVE_READLINE_HISTORY_H) */
-+#       /* no history */
-+#     #endif /* HAVE_READLINE_HISTORY */
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2008 Ville Laurikari <vl@iki.fi>
-+#
-+#   Copying and distribution of this file, with or without modification, are
-+#   permitted in any medium without royalty provided the copyright notice
-+#   and this notice are preserved. This file is offered as-is, without any
-+#   warranty.
-+
-+#serial 6
-+
-+AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE])
-+AC_DEFUN([AX_LIB_READLINE], [
-+  AC_CACHE_CHECK([for a readline compatible library],
-+                 ax_cv_lib_readline, [
-+    ORIG_LIBS="$LIBS"
-+    for readline_lib in readline edit editline; do
-+      for termcap_lib in "" termcap curses ncurses; do
-+        if test -z "$termcap_lib"; then
-+          TRY_LIB="-l$readline_lib"
-+        else
-+          TRY_LIB="-l$readline_lib -l$termcap_lib"
-+        fi
-+        LIBS="$ORIG_LIBS $TRY_LIB"
-+        AC_TRY_LINK_FUNC(readline, ax_cv_lib_readline="$TRY_LIB")
-+        if test -n "$ax_cv_lib_readline"; then
-+          break
-+        fi
-+      done
-+      if test -n "$ax_cv_lib_readline"; then
-+        break
-+      fi
-+    done
-+    if test -z "$ax_cv_lib_readline"; then
-+      ax_cv_lib_readline="no"
-+    fi
-+    LIBS="$ORIG_LIBS"
-+  ])
-+
-+  if test "$ax_cv_lib_readline" != "no"; then
-+    LIBS="$LIBS $ax_cv_lib_readline"
-+    AC_DEFINE(HAVE_LIBREADLINE, 1,
-+              [Define if you have a readline compatible library])
-+    AC_CHECK_HEADERS(readline.h readline/readline.h)
-+    AC_CACHE_CHECK([whether readline supports history],
-+                   ax_cv_lib_readline_history, [
-+      ax_cv_lib_readline_history="no"
-+      AC_TRY_LINK_FUNC(add_history, ax_cv_lib_readline_history="yes")
-+    ])
-+    if test "$ax_cv_lib_readline_history" = "yes"; then
-+      AC_DEFINE(HAVE_READLINE_HISTORY, 1,
-+                [Define if your readline library has \`add_history'])
-+      AC_CHECK_HEADERS(history.h readline/history.h)
-+    fi
-+  fi
-+])dnl
-diff --git a/autotools/ax_pthread.m4 b/autotools/ax_pthread.m4
-new file mode 100644
-index 00000000..d383ad5c
---- /dev/null
-+++ b/autotools/ax_pthread.m4
-@@ -0,0 +1,332 @@
-+# ===========================================================================
-+#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-+#
-+# DESCRIPTION
-+#
-+#   This macro figures out how to build C programs using POSIX threads. It
-+#   sets the PTHREAD_LIBS output variable to the threads library and linker
-+#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
-+#   flags that are needed. (The user can also force certain compiler
-+#   flags/libs to be tested by setting these environment variables.)
-+#
-+#   Also sets PTHREAD_CC to any special C compiler that is needed for
-+#   multi-threaded programs (defaults to the value of CC otherwise). (This
-+#   is necessary on AIX to use the special cc_r compiler alias.)
-+#
-+#   NOTE: You are assumed to not only compile your program with these flags,
-+#   but also link it with them as well. e.g. you should link with
-+#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
-+#
-+#   If you are only building threads programs, you may wish to use these
-+#   variables in your default LIBS, CFLAGS, and CC:
-+#
-+#     LIBS="$PTHREAD_LIBS $LIBS"
-+#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+#     CC="$PTHREAD_CC"
-+#
-+#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
-+#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
-+#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-+#
-+#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
-+#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
-+#   PTHREAD_CFLAGS.
-+#
-+#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
-+#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
-+#   is not found. If ACTION-IF-FOUND is not specified, the default action
-+#   will define HAVE_PTHREAD.
-+#
-+#   Please let the authors know if this macro fails on any platform, or if
-+#   you have any other suggestions or comments. This macro was based on work
-+#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
-+#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
-+#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
-+#   grateful for the helpful feedback of numerous users.
-+#
-+#   Updated for Autoconf 2.68 by Daniel Richard G.
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
-+#   Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
-+#
-+#   This program is free software: you can redistribute it and/or modify it
-+#   under the terms of the GNU General Public License as published by the
-+#   Free Software Foundation, either version 3 of the License, or (at your
-+#   option) any later version.
-+#
-+#   This program is distributed in the hope that it will be useful, but
-+#   WITHOUT ANY WARRANTY; without even the implied warranty of
-+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+#   Public License for more details.
-+#
-+#   You should have received a copy of the GNU General Public License along
-+#   with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+#   As a special exception, the respective Autoconf Macro's copyright owner
-+#   gives unlimited permission to copy, distribute and modify the configure
-+#   scripts that are the output of Autoconf when processing the Macro. You
-+#   need not follow the terms of the GNU General Public License when using
-+#   or distributing such scripts, even though portions of the text of the
-+#   Macro appear in them. The GNU General Public License (GPL) does govern
-+#   all other use of the material that constitutes the Autoconf Macro.
-+#
-+#   This special exception to the GPL applies to versions of the Autoconf
-+#   Macro released by the Autoconf Archive. When you make and distribute a
-+#   modified version of the Autoconf Macro, you may extend this special
-+#   exception to the GPL to apply to your modified version as well.
-+
-+#serial 21
-+
-+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
-+AC_DEFUN([AX_PTHREAD], [
-+AC_REQUIRE([AC_CANONICAL_HOST])
-+AC_LANG_PUSH([C])
-+ax_pthread_ok=no
-+
-+# We used to check for pthread.h first, but this fails if pthread.h
-+# requires special compiler flags (e.g. on True64 or Sequent).
-+# It gets checked for in the link test anyway.
-+
-+# First of all, check if the user has set any of the PTHREAD_LIBS,
-+# etcetera environment variables, and if threads linking works using
-+# them:
-+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-+        save_CFLAGS="$CFLAGS"
-+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+        save_LIBS="$LIBS"
-+        LIBS="$PTHREAD_LIBS $LIBS"
-+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-+        AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes])
-+        AC_MSG_RESULT([$ax_pthread_ok])
-+        if test x"$ax_pthread_ok" = xno; then
-+                PTHREAD_LIBS=""
-+                PTHREAD_CFLAGS=""
-+        fi
-+        LIBS="$save_LIBS"
-+        CFLAGS="$save_CFLAGS"
-+fi
-+
-+# We must check for the threads library under a number of different
-+# names; the ordering is very important because some systems
-+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-+# libraries is broken (non-POSIX).
-+
-+# Create a list of thread flags to try.  Items starting with a "-" are
-+# C compiler flags, and other items are library names, except for "none"
-+# which indicates that we try without any flags at all, and "pthread-config"
-+# which is a program returning the flags for the Pth emulation library.
-+
-+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
-+
-+# The ordering *is* (sometimes) important.  Some notes on the
-+# individual items follow:
-+
-+# pthreads: AIX (must check this before -lpthread)
-+# none: in case threads are in libc; should be tried before -Kthread and
-+#       other compiler flags to prevent continual compiler warnings
-+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-+# -pthreads: Solaris/gcc
-+# -mthreads: Mingw32/gcc, Lynx/gcc
-+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-+#      doesn't hurt to check since this sometimes defines pthreads too;
-+#      also defines -D_REENTRANT)
-+#      ... -mt is also the pthreads flag for HP/aCC
-+# pthread: Linux, etcetera
-+# --thread-safe: KAI C++
-+# pthread-config: use pthread-config program (for GNU Pth library)
-+
-+case ${host_os} in
-+        solaris*)
-+
-+        # On Solaris (at least, for some versions), libc contains stubbed
-+        # (non-functional) versions of the pthreads routines, so link-based
-+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
-+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-+        # a function called by this macro, so we could check for that, but
-+        # who knows whether they'll stub that too in a future libc.)  So,
-+        # we'll just look for -pthreads and -lpthread first:
-+
-+        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
-+        ;;
-+
-+        darwin*)
-+        ax_pthread_flags="-pthread $ax_pthread_flags"
-+        ;;
-+esac
-+
-+# Clang doesn't consider unrecognized options an error unless we specify
-+# -Werror. We throw in some extra Clang-specific options to ensure that
-+# this doesn't happen for GCC, which also accepts -Werror.
-+
-+AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
-+save_CFLAGS="$CFLAGS"
-+ax_pthread_extra_flags="-Werror"
-+CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
-+                  [AC_MSG_RESULT([yes])],
-+                  [ax_pthread_extra_flags=
-+                   AC_MSG_RESULT([no])])
-+CFLAGS="$save_CFLAGS"
-+
-+if test x"$ax_pthread_ok" = xno; then
-+for flag in $ax_pthread_flags; do
-+
-+        case $flag in
-+                none)
-+                AC_MSG_CHECKING([whether pthreads work without any flags])
-+                ;;
-+
-+                -*)
-+                AC_MSG_CHECKING([whether pthreads work with $flag])
-+                PTHREAD_CFLAGS="$flag"
-+                ;;
-+
-+                pthread-config)
-+                AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
-+                if test x"$ax_pthread_config" = xno; then continue; fi
-+                PTHREAD_CFLAGS="`pthread-config --cflags`"
-+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
-+                ;;
-+
-+                *)
-+                AC_MSG_CHECKING([for the pthreads library -l$flag])
-+                PTHREAD_LIBS="-l$flag"
-+                ;;
-+        esac
-+
-+        save_LIBS="$LIBS"
-+        save_CFLAGS="$CFLAGS"
-+        LIBS="$PTHREAD_LIBS $LIBS"
-+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags"
-+
-+        # Check for various functions.  We must include pthread.h,
-+        # since some functions may be macros.  (On the Sequent, we
-+        # need a special flag -Kthread to make this header compile.)
-+        # We check for pthread_join because it is in -lpthread on IRIX
-+        # while pthread_create is in libc.  We check for pthread_attr_init
-+        # due to DEC craziness with -lpthreads.  We check for
-+        # pthread_cleanup_push because it is one of the few pthread
-+        # functions on Solaris that doesn't have a non-functional libc stub.
-+        # We try pthread_create on general principles.
-+        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
-+                        static void routine(void *a) { a = 0; }
-+                        static void *start_routine(void *a) { return a; }],
-+                       [pthread_t th; pthread_attr_t attr;
-+                        pthread_create(&th, 0, start_routine, 0);
-+                        pthread_join(th, 0);
-+                        pthread_attr_init(&attr);
-+                        pthread_cleanup_push(routine, 0);
-+                        pthread_cleanup_pop(0) /* ; */])],
-+                [ax_pthread_ok=yes],
-+                [])
-+
-+        LIBS="$save_LIBS"
-+        CFLAGS="$save_CFLAGS"
-+
-+        AC_MSG_RESULT([$ax_pthread_ok])
-+        if test "x$ax_pthread_ok" = xyes; then
-+                break;
-+        fi
-+
-+        PTHREAD_LIBS=""
-+        PTHREAD_CFLAGS=""
-+done
-+fi
-+
-+# Various other checks:
-+if test "x$ax_pthread_ok" = xyes; then
-+        save_LIBS="$LIBS"
-+        LIBS="$PTHREAD_LIBS $LIBS"
-+        save_CFLAGS="$CFLAGS"
-+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+
-+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
-+        AC_MSG_CHECKING([for joinable pthread attribute])
-+        attr_name=unknown
-+        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
-+            AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
-+                           [int attr = $attr; return attr /* ; */])],
-+                [attr_name=$attr; break],
-+                [])
-+        done
-+        AC_MSG_RESULT([$attr_name])
-+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
-+            AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name],
-+                               [Define to necessary symbol if this constant
-+                                uses a non-standard name on your system.])
-+        fi
-+
-+        AC_MSG_CHECKING([if more special flags are required for pthreads])
-+        flag=no
-+        case ${host_os} in
-+            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
-+            osf* | hpux*) flag="-D_REENTRANT";;
-+            solaris*)
-+            if test "$GCC" = "yes"; then
-+                flag="-D_REENTRANT"
-+            else
-+                # TODO: What about Clang on Solaris?
-+                flag="-mt -D_REENTRANT"
-+            fi
-+            ;;
-+        esac
-+        AC_MSG_RESULT([$flag])
-+        if test "x$flag" != xno; then
-+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-+        fi
-+
-+        AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
-+            [ax_cv_PTHREAD_PRIO_INHERIT], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
-+                                                [[int i = PTHREAD_PRIO_INHERIT;]])],
-+                    [ax_cv_PTHREAD_PRIO_INHERIT=yes],
-+                    [ax_cv_PTHREAD_PRIO_INHERIT=no])
-+            ])
-+        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
-+            [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])])
-+
-+        LIBS="$save_LIBS"
-+        CFLAGS="$save_CFLAGS"
-+
-+        # More AIX lossage: compile with *_r variant
-+        if test "x$GCC" != xyes; then
-+            case $host_os in
-+                aix*)
-+                AS_CASE(["x/$CC"],
-+                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
-+                  [#handle absolute path differently from PATH based program lookup
-+                   AS_CASE(["x$CC"],
-+                     [x/*],
-+                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
-+                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
-+                ;;
-+            esac
-+        fi
-+fi
-+
-+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
-+
-+AC_SUBST([PTHREAD_LIBS])
-+AC_SUBST([PTHREAD_CFLAGS])
-+AC_SUBST([PTHREAD_CC])
-+
-+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-+if test x"$ax_pthread_ok" = xyes; then
-+        ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
-+        :
-+else
-+        ax_pthread_ok=no
-+        $2
-+fi
-+AC_LANG_POP
-+])dnl AX_PTHREAD
-diff --git a/autotools/ax_with_curses.m4 b/autotools/ax_with_curses.m4
-new file mode 100644
-index 00000000..e4cbd31b
---- /dev/null
-+++ b/autotools/ax_with_curses.m4
-@@ -0,0 +1,518 @@
-+# ===========================================================================
-+#      http://www.gnu.org/software/autoconf-archive/ax_with_curses.html
-+# ===========================================================================
-+#
-+# SYNOPSIS
-+#
-+#   AX_WITH_CURSES
-+#
-+# DESCRIPTION
-+#
-+#   This macro checks whether a SysV or X/Open-compatible Curses library is
-+#   present, along with the associated header file.  The NcursesW
-+#   (wide-character) library is searched for first, followed by Ncurses,
-+#   then the system-default plain Curses.  The first library found is the
-+#   one returned.
-+#
-+#   The following options are understood: --with-ncursesw, --with-ncurses,
-+#   --without-ncursesw, --without-ncurses.  The "--with" options force the
-+#   macro to use that particular library, terminating with an error if not
-+#   found.  The "--without" options simply skip the check for that library.
-+#   The effect on the search pattern is:
-+#
-+#     (no options)                           - NcursesW, Ncurses, Curses
-+#     --with-ncurses     --with-ncursesw     - NcursesW only [*]
-+#     --without-ncurses  --with-ncursesw     - NcursesW only [*]
-+#                        --with-ncursesw     - NcursesW only [*]
-+#     --with-ncurses     --without-ncursesw  - Ncurses only [*]
-+#     --with-ncurses                         - NcursesW, Ncurses [**]
-+#     --without-ncurses  --without-ncursesw  - Curses only
-+#                        --without-ncursesw  - Ncurses, Curses
-+#     --without-ncurses                      - NcursesW, Curses
-+#
-+#   [*]  If the library is not found, abort the configure script.
-+#
-+#   [**] If the second library (Ncurses) is not found, abort configure.
-+#
-+#   The following preprocessor symbols may be defined by this macro if the
-+#   appropriate conditions are met:
-+#
-+#     HAVE_CURSES             - if any SysV or X/Open Curses library found
-+#     HAVE_CURSES_ENHANCED    - if library supports X/Open Enhanced functions
-+#     HAVE_CURSES_COLOR       - if library supports color (enhanced functions)
-+#     HAVE_CURSES_OBSOLETE    - if library supports certain obsolete features
-+#     HAVE_NCURSESW           - if NcursesW (wide char) library is to be used
-+#     HAVE_NCURSES            - if the Ncurses library is to be used
-+#
-+#     HAVE_CURSES_H           - if <curses.h> is present and should be used
-+#     HAVE_NCURSESW_H         - if <ncursesw.h> should be used
-+#     HAVE_NCURSES_H          - if <ncurses.h> should be used
-+#     HAVE_NCURSESW_CURSES_H  - if <ncursesw/curses.h> should be used
-+#     HAVE_NCURSES_CURSES_H   - if <ncurses/curses.h> should be used
-+#
-+#   (These preprocessor symbols are discussed later in this document.)
-+#
-+#   The following output variable is defined by this macro; it is precious
-+#   and may be overridden on the ./configure command line:
-+#
-+#     CURSES_LIB  - library to add to xxx_LDADD
-+#
-+#   The library listed in CURSES_LIB is NOT added to LIBS by default. You
-+#   need to add CURSES_LIB to the appropriate xxx_LDADD line in your
-+#   Makefile.am.  For example:
-+#
-+#     prog_LDADD = @CURSES_LIB@
-+#
-+#   If CURSES_LIB is set on the configure command line (such as by running
-+#   "./configure CURSES_LIB=-lmycurses"), then the only header searched for
-+#   is <curses.h>.  The user may use the CPPFLAGS precious variable to
-+#   override the standard #include search path.  If the user needs to
-+#   specify an alternative path for a library (such as for a non-standard
-+#   NcurseW), the user should use the LDFLAGS variable.
-+#
-+#   The following shell variables may be defined by this macro:
-+#
-+#     ax_cv_curses           - set to "yes" if any Curses library found
-+#     ax_cv_curses_enhanced  - set to "yes" if Enhanced functions present
-+#     ax_cv_curses_color     - set to "yes" if color functions present
-+#     ax_cv_curses_obsolete  - set to "yes" if obsolete features present
-+#
-+#     ax_cv_ncursesw      - set to "yes" if NcursesW library found
-+#     ax_cv_ncurses       - set to "yes" if Ncurses library found
-+#     ax_cv_plaincurses   - set to "yes" if plain Curses library found
-+#     ax_cv_curses_which  - set to "ncursesw", "ncurses", "plaincurses" or "no"
-+#
-+#   These variables can be used in your configure.ac to determine the level
-+#   of support you need from the Curses library.  For example, if you must
-+#   have either Ncurses or NcursesW, you could include:
-+#
-+#     AX_WITH_CURSES
-+#     if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
-+#         AC_MSG_ERROR([requires either NcursesW or Ncurses library])
-+#     fi
-+#
-+#   If any Curses library will do (but one must be present and must support
-+#   color), you could use:
-+#
-+#     AX_WITH_CURSES
-+#     if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then
-+#         AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])
-+#     fi
-+#
-+#   Certain preprocessor symbols and shell variables defined by this macro
-+#   can be used to determine various features of the Curses library.  In
-+#   particular, HAVE_CURSES and ax_cv_curses are defined if the Curses
-+#   library found conforms to the traditional SysV and/or X/Open Base Curses
-+#   definition.  Any working Curses library conforms to this level.
-+#
-+#   HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the
-+#   library supports the X/Open Enhanced Curses definition.  In particular,
-+#   the wide-character types attr_t, cchar_t and wint_t, the functions
-+#   wattr_set() and wget_wch() and the macros WA_NORMAL and _XOPEN_CURSES
-+#   are checked.  The Ncurses library does NOT conform to this definition,
-+#   although NcursesW does.
-+#
-+#   HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library
-+#   supports color functions and macros such as COLOR_PAIR, A_COLOR,
-+#   COLOR_WHITE, COLOR_RED and init_pair().  These are NOT part of the
-+#   X/Open Base Curses definition, but are part of the Enhanced set of
-+#   functions.  The Ncurses library DOES support these functions, as does
-+#   NcursesW.
-+#
-+#   HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the
-+#   library supports certain features present in SysV and BSD Curses but not
-+#   defined in the X/Open definition.  In particular, the functions
-+#   getattrs(), getcurx() and getmaxx() are checked.
-+#
-+#   To use the HAVE_xxx_H preprocessor symbols, insert the following into
-+#   your system.h (or equivalent) header file:
-+#
-+#     #if defined HAVE_NCURSESW_CURSES_H
-+#     #  include <ncursesw/curses.h>
-+#     #elif defined HAVE_NCURSESW_H
-+#     #  include <ncursesw.h>
-+#     #elif defined HAVE_NCURSES_CURSES_H
-+#     #  include <ncurses/curses.h>
-+#     #elif defined HAVE_NCURSES_H
-+#     #  include <ncurses.h>
-+#     #elif defined HAVE_CURSES_H
-+#     #  include <curses.h>
-+#     #else
-+#     #  error "SysV or X/Open-compatible Curses header file required"
-+#     #endif
-+#
-+#   For previous users of this macro: you should not need to change anything
-+#   in your configure.ac or Makefile.am, as the previous (serial 10)
-+#   semantics are still valid.  However, you should update your system.h (or
-+#   equivalent) header file to the fragment shown above. You are encouraged
-+#   also to make use of the extended functionality provided by this version
-+#   of AX_WITH_CURSES, as well as in the additional macros
-+#   AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and AX_WITH_CURSES_FORM.
-+#
-+# LICENSE
-+#
-+#   Copyright (c) 2009 Mark Pulford <mark@kyne.com.au>
-+#   Copyright (c) 2009 Damian Pietras <daper@daper.net>
-+#   Copyright (c) 2012 Reuben Thomas <rrt@sc3d.org>
-+#   Copyright (c) 2011 John Zaitseff <J.Zaitseff@zap.org.au>
-+#
-+#   This program is free software: you can redistribute it and/or modify it
-+#   under the terms of the GNU General Public License as published by the
-+#   Free Software Foundation, either version 3 of the License, or (at your
-+#   option) any later version.
-+#
-+#   This program is distributed in the hope that it will be useful, but
-+#   WITHOUT ANY WARRANTY; without even the implied warranty of
-+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-+#   Public License for more details.
-+#
-+#   You should have received a copy of the GNU General Public License along
-+#   with this program. If not, see <http://www.gnu.org/licenses/>.
-+#
-+#   As a special exception, the respective Autoconf Macro's copyright owner
-+#   gives unlimited permission to copy, distribute and modify the configure
-+#   scripts that are the output of Autoconf when processing the Macro. You
-+#   need not follow the terms of the GNU General Public License when using
-+#   or distributing such scripts, even though portions of the text of the
-+#   Macro appear in them. The GNU General Public License (GPL) does govern
-+#   all other use of the material that constitutes the Autoconf Macro.
-+#
-+#   This special exception to the GPL applies to versions of the Autoconf
-+#   Macro released by the Autoconf Archive. When you make and distribute a
-+#   modified version of the Autoconf Macro, you may extend this special
-+#   exception to the GPL to apply to your modified version as well.
-+
-+#serial 15
-+
-+AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
-+AC_DEFUN([AX_WITH_CURSES], [
-+    AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses])
-+    AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses],
-+        [force the use of Ncurses or NcursesW])],
-+        [], [with_ncurses=check])
-+    AC_ARG_WITH([ncursesw], [AS_HELP_STRING([--without-ncursesw],
-+        [do not use NcursesW (wide character support)])],
-+        [], [with_ncursesw=check])
-+
-+    ax_saved_LIBS=$LIBS
-+    AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes],
-+        [ax_with_plaincurses=no], [ax_with_plaincurses=check])
-+
-+    ax_cv_curses_which=no
-+
-+    # Test for NcursesW
-+
-+    AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno], [
-+        LIBS="$ax_saved_LIBS -lncursesw"
-+
-+        AC_CACHE_CHECK([for NcursesW wide-character library], [ax_cv_ncursesw], [
-+            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
-+                [ax_cv_ncursesw=yes], [ax_cv_ncursesw=no])
-+        ])
-+        AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [
-+            AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library])
-+        ])
-+
-+        AS_IF([test "x$ax_cv_ncursesw" = xyes], [
-+            ax_cv_curses=yes
-+            ax_cv_curses_which=ncursesw
-+            CURSES_LIB="-lncursesw"
-+            AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present])
-+            AC_DEFINE([HAVE_CURSES],   [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
-+
-+            AC_CACHE_CHECK([for working ncursesw/curses.h], [ax_cv_header_ncursesw_curses_h], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
-+                        @%:@include <ncursesw/curses.h>
-+                    ]], [[
-+                        chtype a = A_BOLD;
-+                        int b = KEY_LEFT;
-+                        chtype c = COLOR_PAIR(1) & A_COLOR;
-+                        attr_t d = WA_NORMAL;
-+                        cchar_t e;
-+                        wint_t f;
-+                        int g = getattrs(stdscr);
-+                        int h = getcurx(stdscr) + getmaxx(stdscr);
-+                        initscr();
-+                        init_pair(1, COLOR_WHITE, COLOR_RED);
-+                        wattr_set(stdscr, d, 0, NULL);
-+                        wget_wch(stdscr, &f);
-+                    ]])],
-+                    [ax_cv_header_ncursesw_curses_h=yes],
-+                    [ax_cv_header_ncursesw_curses_h=no])
-+            ])
-+            AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xyes], [
-+                ax_cv_curses_enhanced=yes
-+                ax_cv_curses_color=yes
-+                ax_cv_curses_obsolete=yes
-+                AC_DEFINE([HAVE_CURSES_ENHANCED],   [1], [Define to 1 if library supports X/Open Enhanced functions])
-+                AC_DEFINE([HAVE_CURSES_COLOR],      [1], [Define to 1 if library supports color (enhanced functions)])
-+                AC_DEFINE([HAVE_CURSES_OBSOLETE],   [1], [Define to 1 if library supports certain obsolete features])
-+                AC_DEFINE([HAVE_NCURSESW_CURSES_H], [1], [Define to 1 if <ncursesw/curses.h> is present])
-+            ])
-+
-+            AC_CACHE_CHECK([for working ncursesw.h], [ax_cv_header_ncursesw_h], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
-+                        @%:@include <ncursesw.h>
-+                    ]], [[
-+                        chtype a = A_BOLD;
-+                        int b = KEY_LEFT;
-+                        chtype c = COLOR_PAIR(1) & A_COLOR;
-+                        attr_t d = WA_NORMAL;
-+                        cchar_t e;
-+                        wint_t f;
-+                        int g = getattrs(stdscr);
-+                        int h = getcurx(stdscr) + getmaxx(stdscr);
-+                        initscr();
-+                        init_pair(1, COLOR_WHITE, COLOR_RED);
-+                        wattr_set(stdscr, d, 0, NULL);
-+                        wget_wch(stdscr, &f);
-+                    ]])],
-+                    [ax_cv_header_ncursesw_h=yes],
-+                    [ax_cv_header_ncursesw_h=no])
-+            ])
-+            AS_IF([test "x$ax_cv_header_ncursesw_h" = xyes], [
-+                ax_cv_curses_enhanced=yes
-+                ax_cv_curses_color=yes
-+                ax_cv_curses_obsolete=yes
-+                AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
-+                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
-+                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
-+                AC_DEFINE([HAVE_NCURSESW_H],      [1], [Define to 1 if <ncursesw.h> is present])
-+            ])
-+
-+            AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h_with_ncursesw], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
-+                        @%:@include <ncurses.h>
-+                    ]], [[
-+                        chtype a = A_BOLD;
-+                        int b = KEY_LEFT;
-+                        chtype c = COLOR_PAIR(1) & A_COLOR;
-+                        attr_t d = WA_NORMAL;
-+                        cchar_t e;
-+                        wint_t f;
-+                        int g = getattrs(stdscr);
-+                        int h = getcurx(stdscr) + getmaxx(stdscr);
-+                        initscr();
-+                        init_pair(1, COLOR_WHITE, COLOR_RED);
-+                        wattr_set(stdscr, d, 0, NULL);
-+                        wget_wch(stdscr, &f);
-+                    ]])],
-+                    [ax_cv_header_ncurses_h_with_ncursesw=yes],
-+                    [ax_cv_header_ncurses_h_with_ncursesw=no])
-+            ])
-+            AS_IF([test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes], [
-+                ax_cv_curses_enhanced=yes
-+                ax_cv_curses_color=yes
-+                ax_cv_curses_obsolete=yes
-+                AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
-+                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
-+                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
-+                AC_DEFINE([HAVE_NCURSES_H],       [1], [Define to 1 if <ncurses.h> is present])
-+            ])
-+
-+            AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno], [
-+                AC_MSG_WARN([could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h])
-+            ])
-+        ])
-+    ])
-+
-+    # Test for Ncurses
-+
-+    AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [
-+        LIBS="$ax_saved_LIBS -lncurses"
-+
-+        AC_CACHE_CHECK([for Ncurses library], [ax_cv_ncurses], [
-+            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
-+                [ax_cv_ncurses=yes], [ax_cv_ncurses=no])
-+        ])
-+        AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [
-+            AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library])
-+        ])
-+
-+        AS_IF([test "x$ax_cv_ncurses" = xyes], [
-+            ax_cv_curses=yes
-+            ax_cv_curses_which=ncurses
-+            CURSES_LIB="-lncurses"
-+            AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present])
-+            AC_DEFINE([HAVE_CURSES],  [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
-+
-+            AC_CACHE_CHECK([for working ncurses/curses.h], [ax_cv_header_ncurses_curses_h], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@include <ncurses/curses.h>
-+                    ]], [[
-+                        chtype a = A_BOLD;
-+                        int b = KEY_LEFT;
-+                        chtype c = COLOR_PAIR(1) & A_COLOR;
-+                        int g = getattrs(stdscr);
-+                        int h = getcurx(stdscr) + getmaxx(stdscr);
-+                        initscr();
-+                        init_pair(1, COLOR_WHITE, COLOR_RED);
-+                    ]])],
-+                    [ax_cv_header_ncurses_curses_h=yes],
-+                    [ax_cv_header_ncurses_curses_h=no])
-+            ])
-+            AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xyes], [
-+                ax_cv_curses_color=yes
-+                ax_cv_curses_obsolete=yes
-+                AC_DEFINE([HAVE_CURSES_COLOR],     [1], [Define to 1 if library supports color (enhanced functions)])
-+                AC_DEFINE([HAVE_CURSES_OBSOLETE],  [1], [Define to 1 if library supports certain obsolete features])
-+                AC_DEFINE([HAVE_NCURSES_CURSES_H], [1], [Define to 1 if <ncurses/curses.h> is present])
-+            ])
-+
-+            AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@include <ncurses.h>
-+                    ]], [[
-+                        chtype a = A_BOLD;
-+                        int b = KEY_LEFT;
-+                        chtype c = COLOR_PAIR(1) & A_COLOR;
-+                        int g = getattrs(stdscr);
-+                        int h = getcurx(stdscr) + getmaxx(stdscr);
-+                        initscr();
-+                        init_pair(1, COLOR_WHITE, COLOR_RED);
-+                    ]])],
-+                    [ax_cv_header_ncurses_h=yes],
-+                    [ax_cv_header_ncurses_h=no])
-+            ])
-+            AS_IF([test "x$ax_cv_header_ncurses_h" = xyes], [
-+                ax_cv_curses_color=yes
-+                ax_cv_curses_obsolete=yes
-+                AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
-+                AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
-+                AC_DEFINE([HAVE_NCURSES_H],       [1], [Define to 1 if <ncurses.h> is present])
-+            ])
-+
-+            AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno], [
-+                AC_MSG_WARN([could not find a working ncurses/curses.h or ncurses.h])
-+            ])
-+        ])
-+    ])
-+
-+    # Test for plain Curses (or if CURSES_LIB was set by user)
-+
-+    AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [
-+        AS_IF([test "x$CURSES_LIB" != x], [
-+            LIBS="$ax_saved_LIBS $CURSES_LIB"
-+        ], [
-+            LIBS="$ax_saved_LIBS -lcurses"
-+        ])
-+
-+        AC_CACHE_CHECK([for Curses library], [ax_cv_plaincurses], [
-+            AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
-+                [ax_cv_plaincurses=yes], [ax_cv_plaincurses=no])
-+        ])
-+
-+        AS_IF([test "x$ax_cv_plaincurses" = xyes], [
-+            ax_cv_curses=yes
-+            ax_cv_curses_which=plaincurses
-+            AS_IF([test "x$CURSES_LIB" = x], [
-+                CURSES_LIB="-lcurses"
-+            ])
-+            AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
-+
-+            # Check for base conformance (and header file)
-+
-+            AC_CACHE_CHECK([for working curses.h], [ax_cv_header_curses_h], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@include <curses.h>
-+                    ]], [[
-+                        chtype a = A_BOLD;
-+                        int b = KEY_LEFT;
-+                        initscr();
-+                    ]])],
-+                    [ax_cv_header_curses_h=yes],
-+                    [ax_cv_header_curses_h=no])
-+            ])
-+            AS_IF([test "x$ax_cv_header_curses_h" = xyes], [
-+                AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if <curses.h> is present])
-+
-+                # Check for X/Open Enhanced conformance
-+
-+                AC_CACHE_CHECK([for X/Open Enhanced Curses conformance], [ax_cv_plaincurses_enhanced], [
-+                    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                            @%:@define _XOPEN_SOURCE_EXTENDED 1
-+                            @%:@include <curses.h>
-+                            @%:@ifndef _XOPEN_CURSES
-+                            @%:@error "this Curses library is not enhanced"
-+                            "this Curses library is not enhanced"
-+                            @%:@endif
-+                        ]], [[
-+                            chtype a = A_BOLD;
-+                            int b = KEY_LEFT;
-+                            chtype c = COLOR_PAIR(1) & A_COLOR;
-+                            attr_t d = WA_NORMAL;
-+                            cchar_t e;
-+                            wint_t f;
-+                            initscr();
-+                            init_pair(1, COLOR_WHITE, COLOR_RED);
-+                            wattr_set(stdscr, d, 0, NULL);
-+                            wget_wch(stdscr, &f);
-+                        ]])],
-+                        [ax_cv_plaincurses_enhanced=yes],
-+                        [ax_cv_plaincurses_enhanced=no])
-+                ])
-+                AS_IF([test "x$ax_cv_plaincurses_enhanced" = xyes], [
-+                    ax_cv_curses_enhanced=yes
-+                    ax_cv_curses_color=yes
-+                    AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
-+                    AC_DEFINE([HAVE_CURSES_COLOR],    [1], [Define to 1 if library supports color (enhanced functions)])
-+                ])
-+
-+                # Check for color functions
-+
-+                AC_CACHE_CHECK([for Curses color functions], [ax_cv_plaincurses_color], [
-+                    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@define _XOPEN_SOURCE_EXTENDED 1
-+                        @%:@include <curses.h>
-+                        ]], [[
-+                            chtype a = A_BOLD;
-+                            int b = KEY_LEFT;
-+                            chtype c = COLOR_PAIR(1) & A_COLOR;
-+                            initscr();
-+                            init_pair(1, COLOR_WHITE, COLOR_RED);
-+                        ]])],
-+                        [ax_cv_plaincurses_color=yes],
-+                        [ax_cv_plaincurses_color=no])
-+                ])
-+                AS_IF([test "x$ax_cv_plaincurses_color" = xyes], [
-+                    ax_cv_curses_color=yes
-+                    AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
-+                ])
-+
-+                # Check for obsolete functions
-+
-+                AC_CACHE_CHECK([for obsolete Curses functions], [ax_cv_plaincurses_obsolete], [
-+                AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+                        @%:@include <curses.h>
-+                    ]], [[
-+                        chtype a = A_BOLD;
-+                        int b = KEY_LEFT;
-+                        int g = getattrs(stdscr);
-+                        int h = getcurx(stdscr) + getmaxx(stdscr);
-+                        initscr();
-+                    ]])],
-+                    [ax_cv_plaincurses_obsolete=yes],
-+                    [ax_cv_plaincurses_obsolete=no])
-+                ])
-+                AS_IF([test "x$ax_cv_plaincurses_obsolete" = xyes], [
-+                    ax_cv_curses_obsolete=yes
-+                    AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
-+                ])
-+            ])
-+
-+            AS_IF([test "x$ax_cv_header_curses_h" = xno], [
-+                AC_MSG_WARN([could not find a working curses.h])
-+            ])
-+        ])
-+    ])
-+
-+    AS_IF([test "x$ax_cv_curses"          != xyes], [ax_cv_curses=no])
-+    AS_IF([test "x$ax_cv_curses_enhanced" != xyes], [ax_cv_curses_enhanced=no])
-+    AS_IF([test "x$ax_cv_curses_color"    != xyes], [ax_cv_curses_color=no])
-+    AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no])
-+
-+    LIBS=$ax_saved_LIBS
-+])dnl
-diff --git a/autotools/softether.am b/autotools/softether.am
-new file mode 100644
-index 00000000..e5e91eeb
---- /dev/null
-+++ b/autotools/softether.am
-@@ -0,0 +1,39 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+if CONFIGURE_ENABLE_DEBUG
-+DEBUG_CFLAGS = -g -D_DEBUG -DDEBUG
-+else
-+DEBUG_CFLAGS = -DNDEBUG -DVPN_SPEED
-+endif
-+
-+AM_CFLAGS = \
-+	$(DEBUG_CFLAGS) \
-+	-I$(top_srcdir)/src \
-+	-I$(top_srcdir)/src/Mayaqua \
-+	-I$(top_srcdir)/src/Cedar \
-+	-DUNIX \
-+	-DUNIX_LINUX \
-+	-D_REENTRANT \
-+	-DREENTRANT \
-+	-D_THREAD_SAFE \
-+	-D_THREADSAFE \
-+	-DTHREAD_SAFE \
-+	-DTHREADSAFE \
-+	-D_FILE_OFFSET_BITS=64 \
-+	-fsigned-char
-diff --git a/configure.ac b/configure.ac
-new file mode 100644
-index 00000000..4a3fc2ba
---- /dev/null
-+++ b/configure.ac
-@@ -0,0 +1,96 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+AC_INIT([SoftEther], [1], [http://www.vpnusers.com/], [softether], [http://www.softether.org/])
-+AC_CONFIG_AUX_DIR([autotools])
-+AC_CONFIG_MACRO_DIR([autotools])
-+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
-+AM_PROG_AR
-+AC_PROG_CC
-+AC_PROG_LIBTOOL
-+AC_CONFIG_HEADERS([softether_config.h])
-+AC_CONFIG_FILES([
-+	Makefile
-+	src/Makefile
-+	src/Mayaqua/Makefile
-+	src/Cedar/Makefile
-+	src/hamcorebuilder/Makefile
-+	src/bin/hamcore/Makefile
-+	src/vpnserver/Makefile
-+	src/vpnclient/Makefile
-+	src/vpnbridge/Makefile
-+	src/vpncmd/Makefile
-+])
-+
-+
-+AC_ARG_ENABLE(
-+	[debug],
-+	AS_HELP_STRING([--enable-debug], [build SoftEther with debugging features]),
-+	[debug=yes]
-+)
-+AM_CONDITIONAL([CONFIGURE_ENABLE_DEBUG], [test _"$debug" = _yes])
-+
-+
-+AX_PTHREAD([
-+	AC_SUBST(PTHREAD_CC)
-+	AC_SUBST(PTHREAD_CFLAGS)
-+	AC_SUBST(PTHREAD_LIBS)
-+],[
-+	AC_MSG_ERROR([pthread capabilities not found])
-+])
-+
-+CC="$PTHREAD_CC"
-+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-+LIBS="$PTHREAD_LIBS $LIBS"
-+
-+
-+AX_CHECK_OPENSSL([
-+	AC_SUBST(OPENSSL_LIBS)
-+	AC_SUBST(OPENSSL_LDFLAGS)
-+],[
-+	AC_MSG_ERROR([openssl not found])
-+])
-+
-+LIBS="$LIBS $OPENSSL_LIBS"
-+LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
-+
-+
-+# This macro automatically updates build variables.
-+AX_CHECK_ZLIB(, AC_MSG_ERROR([zlib not found]))
-+
-+
-+AX_WITH_CURSES
-+if test "_$ax_cv_curses" != _yes
-+then
-+	AC_MSG_ERROR([libcurses, libncurses, or libncursesw not found])
-+else
-+	AC_SUBST(CURSES_LIB)
-+	LIBS="$LIBS $CURSES_LIB"
-+fi
-+
-+
-+AX_LIB_READLINE
-+if test "_$ax_cv_lib_readline" = _no
-+then
-+	AC_MSG_ERROR([libreadline not found])
-+else
-+	: This macro automatically updates build variables.
-+fi
-+
-+
-+AC_OUTPUT
---- a/configure	2017-07-16 04:53:31.000000000 +0200
-+++ b/configure	1970-01-01 01:00:00.000000000 +0100
-@@ -1,112 +0,0 @@
--#!/bin/sh
--
--echo '---------------------------------------------------------------------'
--echo 'SoftEther VPN for Unix'
--echo
--echo 'Copyright (c) Daiyuu Nobori.'
--echo 'Copyright (c) SoftEther VPN Project, University of Tsukuba, Japan.'
--echo 'Copyright (c) SoftEther Corporation.'
--echo 'Copyright (c) all contributors on SoftEther VPN project in GitHub.'
--echo
--echo 'License: The Apache License, Version 2.0'
--echo
--echo 'Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.'
--echo '---------------------------------------------------------------------'
--echo
--
--echo 'Welcome to the corner-cutting configure script !'
--echo
--
--OS=""
--case "`uname -s`" in
--Linux)
--	OS="linux"
--	;;
--FreeBSD)
--	OS="freebsd"
--	;;
--SunOS)
--	OS="solaris"
--	;;
--Darwin)
--	OS="macos"
--	;;
--OpenBSD)
--	OS="openbsd"
--	;;
--*)
--	echo 'Select your operating system below:'
--	echo ' 1: Linux'
--	echo ' 2: FreeBSD'
--	echo ' 3: Solaris'
--	echo ' 4: Mac OS X'
--	echo ' 5: OpenBSD'
--	echo
--	echo -n 'Which is your operating system (1 - 5) ? : '
--	read TMP
--	echo
--	if test "$TMP" = "1"
--	then
--		OS="linux"
--	fi
--	if test "$TMP" = "2"
--	then
--		OS="freebsd"
--	fi
--	if test "$TMP" = "3"
--	then
--		OS="solaris"
--	fi
--	if test "$TMP" = "4"
--	then
--		OS="macos"
--	fi
--	if test "$TMP" = "5"
--	then
--		OS="openbsd"
--	fi
--
--	if test "$OS" = ""
--	then
--		echo "Wrong number."
--		exit 1
--	fi
--	;;
--esac
--
--CPU=""
--case "`uname -m`" in
--x86_64|amd64|aarch64|arm64|armv8*|mips64|ppc64|sparc64|alpha|ia64)
--	CPU=64bit
--	;;
--i?86|x86pc|i86pc|armv4*|armv5*|armv6*|armv7*)
--	CPU=32bit
--	;;
--*)
--	echo 'Select your CPU bits below:'
--	echo ' 1: 32-bit'
--	echo ' 2: 64-bit'
--	echo
--	echo -n 'Which is the type of your CPU (1 - 2) ? : '
--	read TMP
--	echo
--	if test "$TMP" = "1"
--	then
--		CPU="32bit"
--	fi
--	if test "$TMP" = "2"
--	then
--		CPU="64bit"
--	fi
--
--	if test "$CPU" = ""
--	then
--		echo "Wrong number."
--		exit 1
--	fi
--	;;
--esac
--
--cp src/makefiles/${OS}_${CPU}.mak Makefile
--
--echo "The Makefile is generated. Run 'make' to build SoftEther VPN."
---- a/manual_configure	1970-01-01 01:00:00.000000000 +0100
-+++ b/manual_configure	2017-07-16 04:53:31.000000000 +0200
-@@ -0,0 +1,112 @@
-+#!/bin/sh
-+
-+echo '---------------------------------------------------------------------'
-+echo 'SoftEther VPN for Unix'
-+echo
-+echo 'Copyright (c) SoftEther VPN Project at University of Tsukuba, Japan.'
-+echo 'Copyright (c) Daiyuu Nobori. All Rights Reserved.'
-+echo
-+echo 'This program is free software; you can redistribute it and/or'
-+echo 'modify it under the terms of the GNU General Public License'
-+echo 'version 2 as published by the Free Software Foundation.'
-+echo
-+echo 'Read and understand README.TXT, LICENSE.TXT and WARNING.TXT before use.'
-+echo '---------------------------------------------------------------------'
-+echo
-+
-+echo 'Welcome to the corner-cutting configure script !'
-+echo
-+
-+OS=""
-+case "`uname -s`" in
-+Linux)
-+	OS="linux"
-+	;;
-+FreeBSD)
-+	OS="freebsd"
-+	;;
-+SunOS)
-+	OS="solaris"
-+	;;
-+Darwin)
-+	OS="macos"
-+	;;
-+OpenBSD)
-+	OS="openbsd"
-+	;;
-+*)
-+	echo 'Select your operating system below:'
-+	echo ' 1: Linux'
-+	echo ' 2: FreeBSD'
-+	echo ' 3: Solaris'
-+	echo ' 4: Mac OS X'
-+	echo ' 5: OpenBSD'
-+	echo
-+	echo -n 'Which is your operating system (1 - 5) ? : '
-+	read TMP
-+	echo
-+	if test "$TMP" = "1"
-+	then
-+		OS="linux"
-+	fi
-+	if test "$TMP" = "2"
-+	then
-+		OS="freebsd"
-+	fi
-+	if test "$TMP" = "3"
-+	then
-+		OS="solaris"
-+	fi
-+	if test "$TMP" = "4"
-+	then
-+		OS="macos"
-+	fi
-+	if test "$TMP" = "5"
-+	then
-+		OS="openbsd"
-+	fi
-+
-+	if test "$OS" = ""
-+	then
-+		echo "Wrong number."
-+		exit 1
-+	fi
-+	;;
-+esac
-+
-+CPU=""
-+case "`uname -m`" in
-+x86_64|amd64|aarch64|arm64|armv8*|mips64|ppc64|sparc64|alpha|ia64)
-+	CPU=64bit
-+	;;
-+i?86|x86pc|i86pc|armv4*|armv5*|armv6*|armv7*)
-+	CPU=32bit
-+	;;
-+*)
-+	echo 'Select your CPU bits below:'
-+	echo ' 1: 32-bit'
-+	echo ' 2: 64-bit'
-+	echo
-+	echo -n 'Which is the type of your CPU (1 - 2) ? : '
-+	read TMP
-+	echo
-+	if test "$TMP" = "1"
-+	then
-+		CPU="32bit"
-+	fi
-+	if test "$TMP" = "2"
-+	then
-+		CPU="64bit"
-+	fi
-+
-+	if test "$CPU" = ""
-+	then
-+		echo "Wrong number."
-+		exit 1
-+	fi
-+	;;
-+esac
-+
-+cp src/makefiles/${OS}_${CPU}.mak Makefile
-+
-+echo "The Makefile is generated. Run 'make' to build SoftEther VPN."
-diff --git a/src/Cedar/Makefile.am b/src/Cedar/Makefile.am
-new file mode 100644
-index 00000000..5346537d
---- /dev/null
-+++ b/src/Cedar/Makefile.am
-@@ -0,0 +1,82 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+noinst_LTLIBRARIES = libcedar.la
-+
-+libcedar_la_SOURCES = \
-+	Account.c \
-+	Admin.c \
-+	AzureClient.c \
-+	AzureServer.c \
-+	Bridge.c \
-+	BridgeUnix.c \
-+	BridgeWin32.c \
-+	Cedar.c \
-+	CedarPch.c \
-+	Client.c \
-+	CM.c \
-+	Command.c \
-+	Connection.c \
-+	Console.c \
-+	Database.c \
-+	DDNS.c \
-+	EM.c \
-+	EtherLog.c \
-+	Hub.c \
-+	Interop_OpenVPN.c \
-+	Interop_SSTP.c \
-+	IPsec.c \
-+	IPsec_EtherIP.c \
-+	IPsec_IKE.c \
-+	IPsec_IkePacket.c \
-+	IPsec_IPC.c \
-+	IPsec_L2TP.c \
-+	IPsec_PPP.c \
-+	IPsec_Win7.c \
-+	Layer3.c \
-+	Link.c \
-+	Listener.c \
-+	Logging.c \
-+	Nat.c \
-+	NativeStack.c \
-+	NM.c \
-+	NullLan.c \
-+	Protocol.c \
-+	Radius.c \
-+	Remote.c \
-+	Sam.c \
-+	SecureInfo.c \
-+	SecureNAT.c \
-+	SeLowUser.c \
-+	Server.c \
-+	Session.c \
-+	SM.c \
-+	SW.c \
-+	UdpAccel.c \
-+	UT.c \
-+	VG.c \
-+	Virtual.c \
-+	VLan.c \
-+	VLanUnix.c \
-+	VLanWin32.c \
-+	WaterMark.c \
-+	WebUI.c \
-+	WinUi.c \
-+	Wpc.c
-diff --git a/src/Makefile.am b/src/Makefile.am
-new file mode 100644
-index 00000000..dc745426
---- /dev/null
-+++ b/src/Makefile.am
-@@ -0,0 +1,26 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+# These components are built as libtool convenience libraries.
-+SUBDIRS = Mayaqua Cedar
-+
-+# This is a nodist helper.
-+SUBDIRS += hamcorebuilder
-+
-+# These are final build products.
-+SUBDIRS += bin/hamcore vpnserver vpnclient vpnbridge vpncmd
-diff --git a/src/Mayaqua/Makefile.am b/src/Mayaqua/Makefile.am
-new file mode 100644
-index 00000000..6b8dc1a6
---- /dev/null
-+++ b/src/Mayaqua/Makefile.am
-@@ -0,0 +1,43 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+noinst_LTLIBRARIES = libmayaqua.la
-+
-+libmayaqua_la_SOURCES = \
-+	Cfg.c \
-+	Encrypt.c \
-+	FileIO.c \
-+	Internat.c \
-+	Kernel.c \
-+	Mayaqua.c \
-+	Memory.c \
-+	Microsoft.c \
-+	Network.c \
-+	Object.c \
-+	OS.c \
-+	Pack.c \
-+	Secure.c \
-+	Str.c \
-+	Table.c \
-+	TcpIp.c \
-+	Tick64.c \
-+	Tracking.c \
-+	Unix.c \
-+	Win32.c
-diff --git a/src/bin/hamcore/Makefile.am b/src/bin/hamcore/Makefile.am
-new file mode 100644
-index 00000000..37b0291e
---- /dev/null
-+++ b/src/bin/hamcore/Makefile.am
-@@ -0,0 +1,29 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+# This is required to use a custom build rule with -Wall and -Werror enabled.
-+AUTOMAKE_OPTIONS = -Wno-override
-+EXEEXT =
-+HAMCOREBUILDER = $(top_builddir)/src/hamcorebuilder/hamcorebuilder
-+
-+sbin_PROGRAMS = hamcore.se2
-+
-+hamcore.se2$(EXEEXT): $(HAMCOREBUILDER)
-+	$(HAMCOREBUILDER) $(top_srcdir)/src/bin/hamcore $@
-diff --git a/src/hamcorebuilder/Makefile.am b/src/hamcorebuilder/Makefile.am
-new file mode 100644
-index 00000000..a22429f0
---- /dev/null
-+++ b/src/hamcorebuilder/Makefile.am
-@@ -0,0 +1,29 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+noinst_PROGRAMS = \
-+	hamcorebuilder
-+
-+hamcorebuilder_SOURCES = \
-+	hamcorebuilder.c
-+
-+hamcorebuilder_LDADD = \
-+	$(top_builddir)/src/Mayaqua/libmayaqua.la \
-+	$(top_builddir)/src/Cedar/libcedar.la
-diff --git a/src/vpnbridge/Makefile.am b/src/vpnbridge/Makefile.am
-new file mode 100644
-index 00000000..35fe043d
---- /dev/null
-+++ b/src/vpnbridge/Makefile.am
-@@ -0,0 +1,29 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+sbin_PROGRAMS = \
-+	vpnbridge
-+
-+vpnbridge_SOURCES = \
-+	vpnbridge.c
-+
-+vpnbridge_LDADD = \
-+	$(top_builddir)/src/Mayaqua/libmayaqua.la \
-+	$(top_builddir)/src/Cedar/libcedar.la
-diff --git a/src/vpnclient/Makefile.am b/src/vpnclient/Makefile.am
-new file mode 100644
-index 00000000..1aa55330
---- /dev/null
-+++ b/src/vpnclient/Makefile.am
-@@ -0,0 +1,29 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+sbin_PROGRAMS = \
-+	vpnclient
-+
-+vpnclient_SOURCES = \
-+	vpncsvc.c
-+
-+vpnclient_LDADD = \
-+	$(top_builddir)/src/Mayaqua/libmayaqua.la \
-+	$(top_builddir)/src/Cedar/libcedar.la
-diff --git a/src/vpncmd/Makefile.am b/src/vpncmd/Makefile.am
-new file mode 100644
-index 00000000..d8042aa2
---- /dev/null
-+++ b/src/vpncmd/Makefile.am
-@@ -0,0 +1,29 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+sbin_PROGRAMS = \
-+	vpncmd
-+
-+vpncmd_SOURCES = \
-+	vpncmd.c
-+
-+vpncmd_LDADD = \
-+	$(top_builddir)/src/Mayaqua/libmayaqua.la \
-+	$(top_builddir)/src/Cedar/libcedar.la
-diff --git a/src/vpnserver/Makefile.am b/src/vpnserver/Makefile.am
-new file mode 100644
-index 00000000..c1c33570
---- /dev/null
-+++ b/src/vpnserver/Makefile.am
-@@ -0,0 +1,29 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+sbin_PROGRAMS = \
-+	vpnserver
-+
-+vpnserver_SOURCES = \
-+	vpnserver.c
-+
-+vpnserver_LDADD = \
-+	$(top_builddir)/src/Mayaqua/libmayaqua.la \
-+	$(top_builddir)/src/Cedar/libcedar.la

+ 0 - 133
package/softether/0002-Create-libsoftether.so-and-dynamically-link.patch

@@ -1,133 +0,0 @@
-From 75625af541fd128f51079d0ffe5ef24645b8f421 Mon Sep 17 00:00:00 2001
-From: Darik Horn <dajhorn@vanadac.com>
-Date: Sun, 13 Apr 2014 12:51:15 -0400
-Subject: [PATCH] Create libsoftether.so and dynamically link the userland.
-
-Sharing object code between vpnbridge, vpnclient, vpnserver, and vpncmd
-reduces the binary size of SoftEther by 85% and its administrative memory
-footprint by 50%.
-
-[Upstream commit https://github.com/dajhorn/SoftEtherVPN/commit/75625af541fd128f51079d0ffe5ef24645b8f421]
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- configure.ac                 |  1 +
- src/Makefile.am              |  7 +++++--
- src/libsoftether/Makefile.am | 34 ++++++++++++++++++++++++++++++++++
- src/vpnbridge/Makefile.am    |  3 +--
- src/vpnclient/Makefile.am    |  3 +--
- src/vpncmd/Makefile.am       |  3 +--
- src/vpnserver/Makefile.am    |  3 +--
- 7 files changed, 44 insertions(+), 10 deletions(-)
- create mode 100644 src/libsoftether/Makefile.am
-
-diff --git a/configure.ac b/configure.ac
-index 4a3fc2ba..94639c44 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -30,6 +30,7 @@ AC_CONFIG_FILES([
- 	src/Mayaqua/Makefile
- 	src/Cedar/Makefile
- 	src/hamcorebuilder/Makefile
-+	src/libsoftether/Makefile
- 	src/bin/hamcore/Makefile
- 	src/vpnserver/Makefile
- 	src/vpnclient/Makefile
-diff --git a/src/Makefile.am b/src/Makefile.am
-index dc745426..1d041d47 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -22,5 +22,8 @@ SUBDIRS = Mayaqua Cedar
- # This is a nodist helper.
- SUBDIRS += hamcorebuilder
- 
--# These are final build products.
--SUBDIRS += bin/hamcore vpnserver vpnclient vpnbridge vpncmd
-+# These are shared components.
-+SUBDIRS += libsoftether bin/hamcore
-+
-+# These are the final build products.
-+SUBDIRS += vpnserver vpnclient vpnbridge vpncmd
-diff --git a/src/libsoftether/Makefile.am b/src/libsoftether/Makefile.am
-new file mode 100644
-index 00000000..601920d9
---- /dev/null
-+++ b/src/libsoftether/Makefile.am
-@@ -0,0 +1,34 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+lib_LTLIBRARIES = \
-+	libsoftether.la
-+
-+libsoftether_la_SOURCES =
-+
-+libsoftether_la_LDFLAGS = \
-+	-avoid-version
-+
-+libsoftether_la_LIBTOOLFLAGS = \
-+	--tag=disable-static
-+
-+libsoftether_la_LIBADD = \
-+	$(top_builddir)/src/Mayaqua/libmayaqua.la \
-+	$(top_builddir)/src/Cedar/libcedar.la
-diff --git a/src/vpnbridge/Makefile.am b/src/vpnbridge/Makefile.am
-index 35fe043d..fb91dd2d 100644
---- a/src/vpnbridge/Makefile.am
-+++ b/src/vpnbridge/Makefile.am
-@@ -25,5 +25,4 @@ vpnbridge_SOURCES = \
- 	vpnbridge.c
- 
- vpnbridge_LDADD = \
--	$(top_builddir)/src/Mayaqua/libmayaqua.la \
--	$(top_builddir)/src/Cedar/libcedar.la
-+	$(top_builddir)/src/libsoftether/libsoftether.la
-diff --git a/src/vpnclient/Makefile.am b/src/vpnclient/Makefile.am
-index 1aa55330..c225c416 100644
---- a/src/vpnclient/Makefile.am
-+++ b/src/vpnclient/Makefile.am
-@@ -25,5 +25,4 @@ vpnclient_SOURCES = \
- 	vpncsvc.c
- 
- vpnclient_LDADD = \
--	$(top_builddir)/src/Mayaqua/libmayaqua.la \
--	$(top_builddir)/src/Cedar/libcedar.la
-+	$(top_builddir)/src/libsoftether/libsoftether.la
-diff --git a/src/vpncmd/Makefile.am b/src/vpncmd/Makefile.am
-index d8042aa2..271affb0 100644
---- a/src/vpncmd/Makefile.am
-+++ b/src/vpncmd/Makefile.am
-@@ -25,5 +25,4 @@ vpncmd_SOURCES = \
- 	vpncmd.c
- 
- vpncmd_LDADD = \
--	$(top_builddir)/src/Mayaqua/libmayaqua.la \
--	$(top_builddir)/src/Cedar/libcedar.la
-+	$(top_builddir)/src/libsoftether/libsoftether.la
-diff --git a/src/vpnserver/Makefile.am b/src/vpnserver/Makefile.am
-index c1c33570..1f7b7f98 100644
---- a/src/vpnserver/Makefile.am
-+++ b/src/vpnserver/Makefile.am
-@@ -25,5 +25,4 @@ vpnserver_SOURCES = \
- 	vpnserver.c
- 
- vpnserver_LDADD = \
--	$(top_builddir)/src/Mayaqua/libmayaqua.la \
--	$(top_builddir)/src/Cedar/libcedar.la
-+	$(top_builddir)/src/libsoftether/libsoftether.la

+ 0 - 307
package/softether/0003-use-fhs-install-directories.patch

@@ -1,307 +0,0 @@
-From b9420c3bfc2a8b9d35d0c8e5f6849007c2bc21fa Mon Sep 17 00:00:00 2001
-From: Darik Horn <dajhorn@vanadac.com>
-Date: Mon, 14 Apr 2014 13:22:24 -0400
-Subject: [PATCH] Use FHS installation directories.
-
-Install to `/usr/sbin`, `/usr/lib`, and `/var/lib` according to the Linux
-filesystem hierarchy standard if SoftEther is built through autotools.
-
-In a managed installation, the FHS stipulates that the application must
-accommodate a read-only installation path.  This requires a new `GetStateDir`
-function that substitutes `GetExeDir` in some parts of the code.
-
-Taken from Github at
-https://github.com/dajhorn/SoftEtherVPN/commit/b9420c3bfc2a8b9d35d0c8e5f6849007c2bc21fa.
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-[Updated for 4.28 build 9669 beta - src/Mayaqua/Encrypt.c dropped IsXRevoked()
-Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
----
- autotools/softether.am      |  1 +
- src/Cedar/Admin.c           |  2 +-
- src/Cedar/Command.c         |  6 +++++-
- src/Cedar/Logging.c         |  2 +-
- src/Cedar/Server.c          |  4 ++--
- src/Mayaqua/FileIO.c        | 39 ++++++++++++++++++++++++++++++++++++---
- src/Mayaqua/FileIO.h        |  2 ++
- src/Mayaqua/Mayaqua.c       |  4 ++++
- src/Mayaqua/Table.c         |  6 +++++-
- src/Mayaqua/Unix.c          |  6 +++---
- src/bin/hamcore/Makefile.am |  8 ++++++--
- 11 files changed, 66 insertions(+), 14 deletions(-)
-
-Index: b/autotools/softether.am
-===================================================================
---- a/autotools/softether.am
-+++ b/autotools/softether.am
-@@ -27,6 +27,7 @@
- 	-I$(top_srcdir)/src \
- 	-I$(top_srcdir)/src/Mayaqua \
- 	-I$(top_srcdir)/src/Cedar \
-+	-DSTATE_DIR='"@localstatedir@/lib/softether"' \
- 	-DUNIX \
- 	-DUNIX_LINUX \
- 	-D_REENTRANT \
-Index: b/src/Cedar/Admin.c
-===================================================================
---- a/src/Cedar/Admin.c
-+++ b/src/Cedar/Admin.c
-@@ -10334,7 +10334,7 @@
- 
- 	Zero(t, sizeof(RPC_READ_LOG_FILE));
- 
--	GetExeDir(exe_dir, sizeof(exe_dir));
-+	GetStateDir(exe_dir, sizeof(exe_dir));
- 	Format(full_path, sizeof(full_path), "%s/%s", exe_dir, filepath);
- 
- 	// Read file
-Index: b/src/Cedar/Command.c
-===================================================================
---- a/src/Cedar/Command.c
-+++ b/src/Cedar/Command.c
-@@ -527,7 +527,7 @@
- 	UINT i;
- 
- 	GetExeName(exe, sizeof(exe));
--	GetExeDir(exe_dir, sizeof(exe_dir));
-+	GetStateDir(exe_dir, sizeof(exe_dir));
- 
- 	ok = false;
- 	dirs = EnumDir(exe_dir);
-@@ -552,7 +552,11 @@
- 		UCHAR *buf;
- 		IO *io;
- #ifndef	OS_WIN32
-+#ifdef STATE_DIR
-+		wchar_t *filename = L"" STATE_DIR L"/vpn_checker_tmp";
-+#else
- 		wchar_t *filename = L"/tmp/vpn_checker_tmp";
-+#endif
- #else	// OS_WIN32
- 		wchar_t filename[MAX_PATH];
- 		CombinePathW(filename, sizeof(filename), MsGetMyTempDirW(), L"vpn_checker_tmp");
-Index: b/src/Cedar/Logging.c
-===================================================================
---- a/src/Cedar/Logging.c
-+++ b/src/Cedar/Logging.c
-@@ -508,7 +508,7 @@
- 
- 	e = ZeroMalloc(sizeof(ERASER));
- 
--	GetExeDir(dir, sizeof(dir));
-+	GetStateDir(dir, sizeof(dir));
- 
- 	e->Log = log;
- 	e->MinFreeSpace = min_size;
-Index: b/src/Cedar/Server.c
-===================================================================
---- a/src/Cedar/Server.c
-+++ b/src/Cedar/Server.c
-@@ -1060,7 +1060,7 @@
- 		hubname = NULL;
- 	}
- 
--	GetExeDir(exe_dir, sizeof(exe_dir));
-+	GetStateDir(exe_dir, sizeof(exe_dir));
- 
- 	// Enumerate in the server_log
- 	if (hubname == NULL)
-@@ -1134,7 +1134,7 @@
- 		return;
- 	}
- 
--	GetExeDir(exe_dir, sizeof(exe_dir));
-+	GetStateDir(exe_dir, sizeof(exe_dir));
- 	Format(dir_full_path, sizeof(dir_full_path), "%s/%s", exe_dir, dirname);
- 
- 	dir = EnumDir(dir_full_path);
-Index: b/src/Mayaqua/FileIO.c
-===================================================================
---- a/src/Mayaqua/FileIO.c
-+++ b/src/Mayaqua/FileIO.c
-@@ -122,8 +122,14 @@
- #include <errno.h>
- #include <Mayaqua/Mayaqua.h>
- 
-+#ifdef STATE_DIR
-+static char exe_file_name[MAX_SIZE] = STATE_DIR "/a.out";
-+static wchar_t exe_file_name_w[MAX_SIZE] = L"" STATE_DIR L"/a.out";
-+#else
- static char exe_file_name[MAX_SIZE] = "/tmp/a.out";
- static wchar_t exe_file_name_w[MAX_SIZE] = L"/tmp/a.out";
-+#endif
-+
- static LIST *hamcore = NULL;
- static IO *hamcore_io = NULL;
- 
-@@ -1038,7 +1044,7 @@
- 	}
- 
- 	// If the file exist in hamcore/ directory on the local disk, read it
--	GetExeDirW(exe_dir, sizeof(exe_dir));
-+	GetStateDirW(exe_dir, sizeof(exe_dir));
- 
- 	UniFormat(tmp, sizeof(tmp), L"%s/%S/%S", exe_dir, HAMCORE_DIR_NAME, filename);
- 
-@@ -1154,7 +1160,7 @@
- 		return;
- 	}
- 
--	GetExeDirW(exe_dir, sizeof(exe_dir));
-+	GetStateDirW(exe_dir, sizeof(exe_dir));
- 	UniFormat(tmp, sizeof(tmp), L"%s/%S", exe_dir, HAMCORE_FILE_NAME);
- 
- 	UniFormat(tmp2, sizeof(tmp2), L"%s/%S", exe_dir, HAMCORE_FILE_NAME_2);
-@@ -1438,6 +1444,33 @@
- 	GetDirNameFromFilePathW(name, size, exe_file_name_w);
- }
- 
-+void GetStateDir(char *name, UINT size)
-+{
-+	// Validate arguments
-+	if (name == NULL)
-+	{
-+		return;
-+	}
-+#ifdef STATE_DIR
-+	StrCpy(name, size, STATE_DIR);
-+#else
-+	GetExeDir(name, size)
-+#endif
-+}
-+void GetStateDirW(wchar_t *name, UINT size)
-+{
-+	// Validate arguments
-+	if (name == NULL)
-+	{
-+		return;
-+	}
-+#ifdef STATE_DIR
-+	UniStrCpy(name, size, L"" STATE_DIR L"");
-+#else
-+	GetExeDirW(name, size)
-+#endif
-+}
-+
- // Get the EXE file name
- void GetExeName(char *name, UINT size)
- {
-@@ -2389,7 +2422,7 @@
- 	else
- 	{
- 		wchar_t dir[MAX_SIZE];
--		GetExeDirW(dir, sizeof(dir));
-+		GetStateDirW(dir, sizeof(dir));
- 		ConbinePathW(dst, size, dir, &src[1]);
- 	}
- }
-Index: b/src/Mayaqua/FileIO.h
-===================================================================
---- a/src/Mayaqua/FileIO.h
-+++ b/src/Mayaqua/FileIO.h
-@@ -349,6 +349,8 @@
- void GetExeNameW(wchar_t *name, UINT size);
- void GetExeDir(char *name, UINT size);
- void GetExeDirW(wchar_t *name, UINT size);
-+void GetStateDir(char *name, UINT size);
-+void GetStateDirW(wchar_t *name, UINT size);
- void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only);
- int CompareHamcore(void *p1, void *p2);
- void InitHamcore();
-Index: b/src/Mayaqua/Mayaqua.c
-===================================================================
---- a/src/Mayaqua/Mayaqua.c
-+++ b/src/Mayaqua/Mayaqua.c
-@@ -611,7 +611,11 @@
- 		_exit(0);
- 	}
- 
-+#ifndef STATE_DIR
-+	// This check causes hamcorebuilder to fail in an unprivileged
-+	// environment, and is unnecessary for a managed installation.
- 	CheckUnixTempDir();
-+#endif
- 
- 	// Initialization of Probe
- 	InitProbe();
-Index: b/src/Mayaqua/Table.c
-===================================================================
---- a/src/Mayaqua/Table.c
-+++ b/src/Mayaqua/Table.c
-@@ -1191,7 +1191,7 @@
- 		return;
- 	}
- 
--	GetExeDirW(exe, sizeof(exe));
-+	GetStateDirW(exe, sizeof(exe));
- 	UniStrCpy(hashtemp, sizeof(hashtemp), strfilename);
- 	BinToStrW(tmp, sizeof(tmp), filehash, MD5_SIZE);
- 	UniStrCat(hashtemp, sizeof(hashtemp), tmp);
-@@ -1204,7 +1204,11 @@
- 	UniStrLower(tmp);
- 
- #ifndef	OS_WIN32
-+#ifdef STATE_DIR
-+	UniStrCpy(exe, sizeof(exe), L"" STATE_DIR L"");
-+#else
- 	UniStrCpy(exe, sizeof(exe), L"/tmp");
-+#endif
- #else	// OS_WIN32
- 	StrToUni(exe, sizeof(exe), MsGetTempDir());
- #endif	// OS_WIN32
-Index: b/src/Mayaqua/Unix.c
-===================================================================
---- a/src/Mayaqua/Unix.c
-+++ b/src/Mayaqua/Unix.c
-@@ -928,7 +928,7 @@
- 		StrCpy(tmp, sizeof(tmp), instance_name);
- 	}
- 
--	GetExeDir(dir, sizeof(dir));
-+	GetStateDir(dir, sizeof(dir));
- 
- 	// File name generation
- 	Format(name, sizeof(name), "%s/.%s", dir, tmp);
-@@ -2260,7 +2260,7 @@
- 		return;
- 	}
- 
--	GetExeDir(dir, sizeof(dir));
-+	GetStateDir(dir, sizeof(dir));
- 
- 	GetExeName(exe_name, sizeof(exe_name));
- 	StrCat(exe_name, sizeof(exe_name), ":pid_hash");
-@@ -2305,7 +2305,7 @@
- 		return;
- 	}
- 
--	GetExeDir(dir, sizeof(dir));
-+	GetStateDir(dir, sizeof(dir));
- 
- 	GetExeName(exe_name, sizeof(exe_name));
- 	StrCat(exe_name, sizeof(exe_name), ":pid_hash");
-Index: b/src/bin/hamcore/Makefile.am
-===================================================================
---- a/src/bin/hamcore/Makefile.am
-+++ b/src/bin/hamcore/Makefile.am
-@@ -18,12 +18,16 @@
- 
- include $(top_srcdir)/autotools/softether.am
- 
--# This is required to use a custom build rule with -Wall and -Werror enabled.
-+# An empty EXEEXT required for overrides with -Wall and -Werror enabled.
- AUTOMAKE_OPTIONS = -Wno-override
- EXEEXT =
-+
- HAMCOREBUILDER = $(top_builddir)/src/hamcorebuilder/hamcorebuilder
- 
--sbin_PROGRAMS = hamcore.se2
-+noinst_PROGRAMS = hamcore.se2
- 
- hamcore.se2$(EXEEXT): $(HAMCOREBUILDER)
- 	$(HAMCOREBUILDER) $(top_srcdir)/src/bin/hamcore $@
-+
-+install-exec-local: hamcore.se2$(EXEEXT)
-+	$(INSTALL_DATA) -D hamcore.se2$(EXEEXT) $(DESTDIR)$(localstatedir)/lib/softether/hamcore.se2

+ 0 - 218
package/softether/0004-create-non-forking-softetherd-for-upstart-and-systemd.patch

@@ -1,218 +0,0 @@
-From 64dd780905ae339a0a57e4aba541799016816a1a Mon Sep 17 00:00:00 2001
-From: Darik Horn <dajhorn@vanadac.com>
-Date: Fri, 3 Oct 2014 13:30:24 -0400
-Subject: [PATCH] Create a non-forking softetherd for upstart and systemd.
-
-Implement a daemon that expects to be invoked by a new-style init like upstart
-or systemd as:
-
-	/usr/sbin/softetherd [vpnbridge|vpnclient|vpnserver]
-
-Alternatively, if the command line argument is empty, then use the
-`SOFTETHER_MODE` environment variable instead.
-
-Conflicts:
-	src/bin/hamcore/strtable_en.stb
-
-Taken from Github at
-https://github.com/dajhorn/SoftEtherVPN/commit/64dd780905ae339a0a57e4aba541799016816a1a.
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- configure.ac                    |   1 +
- src/Makefile.am                 |   3 ++
- src/bin/hamcore/strtable_en.stb |   1 +
- src/softetherd/Makefile.am      |  28 ++++++++++
- src/softetherd/softetherd.c     | 114 ++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 147 insertions(+)
- create mode 100644 src/softetherd/Makefile.am
- create mode 100644 src/softetherd/softetherd.c
-
-Index: b/configure.ac
-===================================================================
---- a/configure.ac
-+++ b/configure.ac
-@@ -36,6 +36,7 @@
- 	src/vpnclient/Makefile
- 	src/vpnbridge/Makefile
- 	src/vpncmd/Makefile
-+	src/softetherd/Makefile
- ])
- 
- 
-Index: b/src/Makefile.am
-===================================================================
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -27,3 +27,6 @@
- 
- # These are the final build products.
- SUBDIRS += vpnserver vpnclient vpnbridge vpncmd
-+
-+# This is a daemon for upstart and systemd.
-+SUBDIRS += softetherd
-Index: b/src/bin/hamcore/strtable_en.stb
-===================================================================
---- a/src/bin/hamcore/strtable_en.stb
-+++ b/src/bin/hamcore/strtable_en.stb
-@@ -1062,6 +1062,7 @@
- 
- 
- # Concerning services (UNIX)
-+UNIX_DAEMON_HELP		SoftEther VPN non-forking daemon for upstart and systemd.\nCommand Usage:\n %S vpnbridge  - Enable bridging features.\n %S vpnclient  - Enable client features.\n %S vpnserver  - Enable all features.\nThe parameter can be set in the SOFTETHER_MODE environment variable.\n\n
- UNIX_SVC_HELP			%S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start  - Start the %S service.\n %S stop   - Stop the %S service if the service has been already started.\n\n
- UNIX_SVC_STARTED		The %S service has been started.\n
- UNIX_SVC_STOPPING		Stopping the %S service ...\n
-Index: b/src/softetherd/Makefile.am
-===================================================================
---- /dev/null
-+++ b/src/softetherd/Makefile.am
-@@ -0,0 +1,28 @@
-+#  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+#
-+#  This file is part of SoftEther.
-+#
-+#  SoftEther is free software: you can redistribute it and/or modify it under
-+#  the terms of the GNU General Public License as published by the Free 
-+#  Software Foundation, either version 2 of the License, or (at your option)
-+#  any later version.
-+#
-+#  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+#  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+#  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+#  details.
-+#
-+#  You should have received a copy of the GNU General Public License along with
-+#  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+include $(top_srcdir)/autotools/softether.am
-+
-+sbin_PROGRAMS = \
-+	softetherd
-+
-+softetherd_SOURCES = \
-+	softetherd.c
-+
-+softetherd_LDADD = \
-+	$(top_builddir)/src/libsoftether/libsoftether.la
-Index: b/src/softetherd/softetherd.c
-===================================================================
---- /dev/null
-+++ b/src/softetherd/softetherd.c
-@@ -0,0 +1,114 @@
-+//  SoftEther VPN daemon for upstart and systemd.
-+//
-+//  Copyright 2014 Darik Horn <dajhorn@vanadac.com>
-+//
-+//  This file is part of SoftEther.
-+//
-+//  SoftEther is free software: you can redistribute it and/or modify it under
-+//  the terms of the GNU General Public License as published by the Free 
-+//  Software Foundation, either version 2 of the License, or (at your option)
-+//  any later version.
-+//
-+//  SoftEther is distributed in the hope that it will be useful, but WITHOUT ANY
-+//  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-+//  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-+//  details.
-+//
-+//  You should have received a copy of the GNU General Public License along with
-+//  SoftEther.  If not, see <http://www.gnu.org/licenses/>.
-+
-+
-+#include <GlobalConst.h>
-+
-+#define	VPN_EXE
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <wchar.h>
-+#include <stdarg.h>
-+#include <time.h>
-+#include <Mayaqua/Mayaqua.h>
-+#include <Cedar/Cedar.h>
-+
-+void DaemonUsage(char *name)
-+{
-+	UniPrint(_UU("UNIX_DAEMON_HELP"), name, name, name);
-+}
-+
-+
-+void DaemonStartProcess()
-+{
-+	// This environment variable is exported by upstart.
-+	char *upstart_job = getenv("UPSTART_JOB");
-+
-+	InitCedar();
-+	StInit();
-+	StStartServer(false);
-+
-+	// Notify upstart that softetherd is ready.
-+	if (upstart_job != NULL)
-+	{
-+		unsetenv("UPSTART_JOB");
-+		raise(SIGSTOP);
-+	}
-+}
-+
-+
-+void DaemonStopProcess()
-+{
-+	StStopServer();
-+	StFree();
-+	FreeCedar();
-+}
-+
-+
-+int main(int argc, char *argv[])
-+{
-+	// This environment variable is sourced and exported by the init process from /etc/default/softether.
-+	char *softether_mode = getenv("SOFTETHER_MODE");
-+
-+	InitMayaqua(false, false, argc, argv);
-+
-+	// Check for an explicit invocation. (eg: "/usr/sbin/softetherd vpnserver")
-+	if (argc >= 2)
-+	{
-+		if (StrCmpi(argv[1], "vpnbridge") == 0
-+		 || StrCmpi(argv[1], "vpnclient") == 0
-+		 || StrCmpi(argv[1], "vpnserver") == 0)
-+		{
-+			UnixExecService(argv[1], DaemonStartProcess, DaemonStopProcess);
-+			FreeMayaqua();
-+			return 0;
-+		}
-+
-+		// Exit status codes 150..199 are reserved for the application by the LSB.
-+		fprintf(stderr, "Error: Unrecognized parameter: %s\n", argv[1]);
-+		fflush(stderr);
-+		FreeMayaqua();
-+		return 150;
-+	}
-+
-+	// Alternatively, use the environment variable.
-+	if (softether_mode != NULL)
-+	{
-+		if (StrCmpi(softether_mode, "vpnbridge") == 0 
-+		 || StrCmpi(softether_mode, "vpnclient") == 0
-+		 || StrCmpi(softether_mode, "vpnserver") == 0)
-+		{
-+			UnixExecService(softether_mode, DaemonStartProcess, DaemonStopProcess);
-+			FreeMayaqua();
-+			return 0;
-+		}
-+
-+		// Exit status codes 150..199 are reserved for the application by the LSB.
-+		fprintf(stderr, "Error: Unrecognized environment variable: SOFTETHER_MODE=%s\n", softether_mode);
-+		fflush(stderr);
-+		FreeMayaqua();
-+		return 151;
-+	}
-+
-+	DaemonUsage(argv[0]);
-+	FreeMayaqua();
-+	return 3;
-+}

+ 0 - 90
package/softether/0005-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch

@@ -1,90 +0,0 @@
-From d68db9f2cee975aad5e07b44485615f3d842ab45 Mon Sep 17 00:00:00 2001
-From: Darik Horn <dajhorn@vanadac.com>
-Date: Fri, 11 Jul 2014 16:17:18 -0400
-Subject: [PATCH] Change GetExeDir to GetStateDir in Cedar and Mayaqua.
-
-Resolve this AppArmor error by ensuring that certificate files files are
-written into /var/lib/softether instead of the current working directory:
-
-	Profile: /usr/sbin/softetherd
-	Operation: mkdir
-	Name: /usr/sbin/chain_certs
-	Denied: c
-	Logfile: /var/log/kern.log
-
-	type=1400 audit: apparmor="DENIED" operation="mkdir" profile="/usr/sbin/softetherd" name="/usr/sbin/chain_certs/" pid=36448 comm="softetherd" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
-
-Taken from Github
-https://github.com/dajhorn/SoftEtherVPN/commit/d68db9f2cee975aad5e07b44485615f3d842ab45.
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- src/Cedar/Protocol.c  | 12 ++++++------
- src/Mayaqua/Network.c |  6 +++---
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-Index: b/src/Cedar/Protocol.c
-===================================================================
---- a/src/Cedar/Protocol.c
-+++ b/src/Cedar/Protocol.c
-@@ -161,10 +161,10 @@
- 		UINT i;
- 		DIRLIST *dir;
- 		wchar_t dirname[MAX_SIZE];
--		wchar_t exedir[MAX_SIZE];
-+		wchar_t statedir[MAX_SIZE];
- 
--		GetExeDirW(exedir, sizeof(exedir));
--		CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
-+		GetStateDirW(statedir, sizeof(statedir));
-+		CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
- 		MakeDirExW(dirname);
- 
- 		if (auto_save)
-@@ -461,7 +461,7 @@
- void AddAllChainCertsToCertList(LIST *o)
- {
- 	wchar_t dirname[MAX_SIZE];
--	wchar_t exedir[MAX_SIZE];
-+	wchar_t statedir[MAX_SIZE];
- 	DIRLIST *dir;
- 	// Validate arguments
- 	if (o == NULL)
-@@ -469,9 +469,9 @@
- 		return;
- 	}
- 
--	GetExeDirW(exedir, sizeof(exedir));
-+	GetStateDirW(statedir, sizeof(statedir));
- 
--	CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
-+	CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
- 
- 	MakeDirExW(dirname);
- 
-Index: b/src/Mayaqua/Network.c
-===================================================================
---- a/src/Mayaqua/Network.c
-+++ b/src/Mayaqua/Network.c
-@@ -12588,7 +12588,7 @@
- void AddChainSslCertOnDirectory(struct ssl_ctx_st *ctx)
- {
- 	wchar_t dirname[MAX_SIZE];
--	wchar_t exedir[MAX_SIZE];
-+	wchar_t statedir[MAX_SIZE];
- 	wchar_t txtname[MAX_SIZE];
- 	DIRLIST *dir;
- 	LIST *o;
-@@ -12602,9 +12602,9 @@
- 
- 	o = NewListFast(NULL);
- 
--	GetExeDirW(exedir, sizeof(exedir));
-+	GetStateDirW(statedir, sizeof(statedir));
- 
--	CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs");
-+	CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs");
- 
- 	MakeDirExW(dirname);
- 

+ 0 - 30
package/softether/0006-cross-compile.patch

@@ -1,30 +0,0 @@
-Host version of hamcorebuilder is needed during cross-compile
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
-diff -uNr SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/bin/hamcore/Makefile.am SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/bin/hamcore/Makefile.am
---- SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/bin/hamcore/Makefile.am	2014-09-27 12:56:53.108725793 +0200
-+++ SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/bin/hamcore/Makefile.am	2014-09-27 12:57:50.280009025 +0200
-@@ -26,8 +26,8 @@
- 
- noinst_PROGRAMS = hamcore.se2
- 
--hamcore.se2$(EXEEXT): $(HAMCOREBUILDER)
--	$(HAMCOREBUILDER) $(top_srcdir)/src/bin/hamcore $@
-+hamcore.se2$(EXEEXT):
-+	hamcorebuilder $(top_srcdir)/src/bin/hamcore $@
- 
- install-exec-local: hamcore.se2$(EXEEXT)
- 	$(INSTALL_DATA) -D hamcore.se2$(EXEEXT) $(DESTDIR)$(localstatedir)/lib/softether/hamcore.se2
-diff -uNr SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/Makefile.am SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/Makefile.am
---- SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/Makefile.am	2014-09-27 12:56:53.136726809 +0200
-+++ SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/Makefile.am	2014-09-27 12:58:12.959723109 +0200
-@@ -20,7 +20,7 @@
- SUBDIRS = Mayaqua Cedar
- 
- # This is a nodist helper.
--SUBDIRS += hamcorebuilder
-+# SUBDIRS += hamcorebuilder
- 
- # These are shared components.
- SUBDIRS += libsoftether bin/hamcore

+ 0 - 28
package/softether/0007-iconv.patch

@@ -1,28 +0,0 @@
-Fix linking with libiconv
-
-Inspired by https://github.com/el1n/OpenWRT-package-softether/blob/4cb1cd9073a76edf34c512e587069626e02e2404/patches/120-fix-iconv-headers-common.patch
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
-Index: b/src/Mayaqua/Mayaqua.h
-===================================================================
---- a/src/Mayaqua/Mayaqua.h
-+++ b/src/Mayaqua/Mayaqua.h
-@@ -282,17 +282,7 @@
- #include <ifaddrs.h>
- #endif	// MAYAQUA_SUPPORTS_GETIFADDRS
- 
--#ifdef	UNIX_LINUX
--typedef void *iconv_t;
--iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
--size_t iconv (iconv_t __cd, char **__restrict __inbuf,
--                     size_t *__restrict __inbytesleft,
--                     char **__restrict __outbuf,
--                     size_t *__restrict __outbytesleft);
--int iconv_close (iconv_t __cd);
--#else	// UNIX_LINUX
- #include <iconv.h>
--#endif	// UNIX_LINUX
- 
- 
- 

+ 0 - 33
package/softether/0008-librt.patch

@@ -1,33 +0,0 @@
-Downloaded from
-https://github.com/dajhorn/SoftEtherVPN/commit/9a8538a6f2287fe8bebd0a7185de408e31e5a7df
-
-Fixes
-http://autobuild.buildroot.net/results/48f/48f778a891e0bf6a60ed2e4bec057c338ec25ec9/
-and many others
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
-
-From 9a8538a6f2287fe8bebd0a7185de408e31e5a7df Mon Sep 17 00:00:00 2001
-From: Darik Horn <dajhorn@vanadac.com>
-Date: Thu, 5 Jun 2014 21:02:02 -0400
-Subject: [PATCH] Add an explicit autoconf check for librt.
-
-The realtime extensions library is not automatically linked on Debian ARM
-platforms, so do an AC_CHECK_LIB for it in the configuration macro.
----
- configure.ac | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure.ac b/configure.ac
-index 165623a..6f85393 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,6 +60,7 @@ CC="$PTHREAD_CC"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- LIBS="$PTHREAD_LIBS $LIBS"
- 
-+AC_CHECK_LIB([rt],[clock_gettime])
- 
- AX_CHECK_OPENSSL([
- 	AC_SUBST(OPENSSL_LIBS)

+ 0 - 27
package/softether/0009-uclibc-ai-addrconfig.patch

@@ -1,27 +0,0 @@
-Only enable getifaddrs support when available
-
-On uClibc, the ifaddrs.h support is optional. While the default
-Buildroot uClibc configuration has it enabled, some external
-toolchains may not. Therefore this patch detects that and adjusts
-softether usage of ifaddrs accordingly.
-
-Based on an initial patch from Bernd Kuhls.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/src/Mayaqua/Mayaqua.h
-===================================================================
---- a/src/Mayaqua/Mayaqua.h
-+++ b/src/Mayaqua/Mayaqua.h
-@@ -235,9 +235,11 @@
- #ifdef	OS_UNIX
- #ifndef	UNIX_SOLARIS
- #ifndef	CPU_SH4
-+#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__)
- // Getifaddrs system call is supported on UNIX other than Solaris.
- // However, it is not supported also by the Linux on SH4 CPU
- #define	MAYAQUA_SUPPORTS_GETIFADDRS
-+#endif  // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG
- #endif	// CPU_SH4
- #endif	// UNIX_SOLARIS
- #endif	// OS_UNIX

+ 0 - 167
package/softether/0010-use-bool-from-stdbool.patch

@@ -1,167 +0,0 @@
-From 914bfe7d44f8e693d21178055f0b845c613dc777 Mon Sep 17 00:00:00 2001
-From: Davide Beatrici <git@davidebeatrici.dev>
-Date: Sun, 28 Feb 2021 06:04:11 +0100
-Subject: [PATCH] Use bool from stdbool.h, get rid of BOOL
-
-BOOL was just an alias for bool, this commit replaces all instances of it for consistency.
-
-For some reason bool was defined as a 4-byte integer instead of a 1-byte one, presumably to match WinAPI's definition: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types
-Nothing should break now that bool is 1-byte, as no protocol code appears to be relying on the size of the data type.
-PACK, for example, explicitly stores boolean values as 4-byte integers.
-
-This commit can be seen as a follow-up to 61ccaed4f6c1bba53202a6d10841fd78b8b6cf8.
-
-Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/914bfe7d44f8e693d21178055f0b845c613dc777
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- src/Cedar/Cedar.h         | 4 ----
- src/Cedar/Command.c       | 2 +-
- src/Cedar/Connection.h    | 2 +-
- src/Cedar/EtherLog.h      | 2 +-
- src/Cedar/Radius.c        | 2 +-
- src/Cedar/Win32Com.cpp    | 2 --
- src/Cedar/Win32Com.h      | 6 ------
- src/Cedar/WinJumpList.cpp | 3 ---
- src/Mayaqua/MayaType.h    | 9 ++-------
- 9 files changed, 6 insertions(+), 26 deletions(-)
-
-diff --git a/src/Cedar/Cedar.h b/src/Cedar/Cedar.h
-index cc32fc28..267b3957 100644
---- a/src/Cedar/Cedar.h
-+++ b/src/Cedar/Cedar.h
-@@ -121,10 +121,6 @@
- 
- #endif	// VPN_SPEED
- 
--#define	bool	UINT
--#define	BOOL	UINT
--
--
- // Version number
- #define	CEDAR_VER					430
- 
-diff --git a/src/Cedar/Command.c b/src/Cedar/Command.c
-index 5b2c67e8..7bd19799 100644
---- a/src/Cedar/Command.c
-+++ b/src/Cedar/Command.c
-@@ -22433,7 +22433,7 @@ void CtEscapeCsv(wchar_t *dst, UINT size, wchar_t *src){
- 	UINT i;
- 	UINT len = UniStrLen(src);
- 	UINT idx;
--	BOOL need_to_escape = false;
-+	bool need_to_escape = false;
- 	wchar_t tmp[2]=L"*";
- 
- 	// Check the input value
-diff --git a/src/Cedar/Connection.h b/src/Cedar/Connection.h
-index 2b1f8091..47b2e4aa 100644
---- a/src/Cedar/Connection.h
-+++ b/src/Cedar/Connection.h
-@@ -244,7 +244,7 @@ struct UDP
- // Data block
- struct BLOCK
- {
--	BOOL Compressed;				// Compression flag
-+	bool Compressed;				// Compression flag
- 	UINT Size;						// Block size
- 	UINT SizeofData;				// Data size
- 	UCHAR *Buf;						// Buffer
-diff --git a/src/Cedar/EtherLog.h b/src/Cedar/EtherLog.h
-index 3fdcf140..e3dda9da 100644
---- a/src/Cedar/EtherLog.h
-+++ b/src/Cedar/EtherLog.h
-@@ -148,7 +148,7 @@ struct RPC_ENUM_DEVICE
- // License status of the service
- struct RPC_EL_LICENSE_STATUS
- {
--	BOOL Valid;								// Enable flag
-+	bool Valid;								// Enable flag
- 	UINT64 SystemId;						// System ID
- 	UINT64 SystemExpires;					// System expiration date
- };
-diff --git a/src/Cedar/Radius.c b/src/Cedar/Radius.c
-index bcbac5d4..9dcfe05d 100644
---- a/src/Cedar/Radius.c
-+++ b/src/Cedar/Radius.c
-@@ -1889,7 +1889,7 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec
- 			SOCK *sock;
- 			USHORT sz = 0;
- 			UINT pos = 0;
--			BOOL *finish = ZeroMallocEx(sizeof(BOOL) * LIST_NUM(ip_list), true);
-+			bool *finish = ZeroMallocEx(sizeof(bool) * LIST_NUM(ip_list), true);
- 
- 			Zero(tmp, sizeof(tmp));
- 
-diff --git a/src/Cedar/Win32Com.cpp b/src/Cedar/Win32Com.cpp
-index e567c557..65c21988 100644
---- a/src/Cedar/Win32Com.cpp
-+++ b/src/Cedar/Win32Com.cpp
-@@ -106,8 +106,6 @@
- 
- #ifdef	WIN32
- 
--#define	WIN32COM_CPP
--
- #define _WIN32_DCOM
- 
- //#define	_WIN32_WINNT		0x0502
-diff --git a/src/Cedar/Win32Com.h b/src/Cedar/Win32Com.h
-index 6191d7e0..eb4810e4 100644
---- a/src/Cedar/Win32Com.h
-+++ b/src/Cedar/Win32Com.h
-@@ -105,12 +105,6 @@
- #ifndef	WIN32COM_H
- #define	WIN32COM_H
- 
--#ifdef	WIN32COM_CPP
--
--// Internal function
--
--#endif	// WIN32COM_CPP
--
- // For external function
- 
- #pragma comment(lib,"htmlhelp.lib")
-diff --git a/src/Cedar/WinJumpList.cpp b/src/Cedar/WinJumpList.cpp
-index 7bd375a1..7b5fabe2 100644
---- a/src/Cedar/WinJumpList.cpp
-+++ b/src/Cedar/WinJumpList.cpp
-@@ -132,9 +132,6 @@
- #undef StrCmp
- #endif
- 
--
--#define	WIN32COM_CPP
--
- //#define	_WIN32_WINNT		0x0502
- //#define	WINVER				0x0502
- #include <winsock2.h>
-diff --git a/src/Mayaqua/MayaType.h b/src/Mayaqua/MayaType.h
-index ae173617..9d5bc3c1 100644
---- a/src/Mayaqua/MayaType.h
-+++ b/src/Mayaqua/MayaType.h
-@@ -105,6 +105,8 @@
- #ifndef	MAYATYPE_H
- #define	MAYATYPE_H
- 
-+#include <stdbool.h>
-+
- // Check whether the windows.h header is included
- #ifndef	WINDOWS_H
- #ifdef	_WINDOWS_
-@@ -252,13 +254,6 @@ typedef	unsigned int		BOOL;
- #define	FALSE				0
- #endif	// WINDOWS_H
- 
--// bool type
--#ifndef	WIN32COM_CPP
--typedef	unsigned int		bool;
--#define	true				1
--#define	false				0
--#endif	// WIN32COM_CPP
--
- // 32bit integer type
- #ifndef	WINDOWS_H
- typedef	unsigned int		UINT;
--- 
-2.39.5

+ 0 - 34
package/softether/0011-fix-implicit-declaration-of-function-getch.patch

@@ -1,34 +0,0 @@
-From 84c44fbe243dabc91d4fa25f2ba878dcaca9856e Mon Sep 17 00:00:00 2001
-From: Davide Beatrici <davidebeatrici@gmail.com>
-Date: Fri, 10 Aug 2018 21:22:36 +0200
-Subject: [PATCH] Console.c: fix "implicit declaration of function 'getch'"
- warning
-
-/builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c: In function 'PasswordPrompt':
-/builds/SoftEther/SoftEtherVPN/src/Cedar/Console.c:2051:8: warning: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
-    c = getch();
-        ^~~~~
-        getc
-
-Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/84c44fbe243dabc91d4fa25f2ba878dcaca9856e
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- src/Cedar/Console.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/Cedar/Console.c b/src/Cedar/Console.c
-index ec861a4ed..2c384facf 100644
---- a/src/Cedar/Console.c
-+++ b/src/Cedar/Console.c
-@@ -2048,7 +2048,11 @@ bool PasswordPrompt(char *password, UINT size)
- 		else if (c == 0xE0)
- 		{
- 			// Read one more character
-+#ifdef	OS_WIN32
- 			c = getch();
-+#else	// OS_WIN32
-+			c = getc(stdin);
-+#endif	// OS_WIN32
- 			if (c == 0x4B || c == 0x53)
- 			{
- 				// Backspace

+ 0 - 31
package/softether/0012-vlanunix-fix-implicit-declaration-of-function-freetap.patch

@@ -1,31 +0,0 @@
-From 49ed8770b87af46d92091464ecf41ae9b5027cd7 Mon Sep 17 00:00:00 2001
-From: Davide Beatrici <davidebeatrici@gmail.com>
-Date: Fri, 10 Aug 2018 21:21:19 +0200
-Subject: [PATCH] VLanUnix: fix "implicit declaration of function 'FreeTap'"
- warning
-
-In file included from /builds/SoftEther/SoftEtherVPN/src/Cedar/Bridge.c:130:0:
-/builds/SoftEther/SoftEtherVPN/src/Cedar/BridgeUnix.c: In function 'CloseEth':
-/builds/SoftEther/SoftEtherVPN/src/Cedar/BridgeUnix.c:1568:3: warning: implicit declaration of function 'FreeTap'; did you mean 'FreeCaps'? [-Wimplicit-function-declaration]
-   FreeTap(e->Tap);
-   ^~~~~~~
-   FreeCaps
-
-Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/49ed8770b87af46d92091464ecf41ae9b5027cd7
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- src/Cedar/VLanUnix.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/Cedar/VLanUnix.h b/src/Cedar/VLanUnix.h
-index b628dcd4f..89ae9c2d8 100644
---- a/src/Cedar/VLanUnix.h
-+++ b/src/Cedar/VLanUnix.h
-@@ -122,6 +122,7 @@ struct VLAN
- VLAN *NewVLan(char *instance_name, VLAN_PARAM *param);
- VLAN *NewTap(char *name, char *mac_address);
- void FreeVLan(VLAN *v);
-+void FreeTap(VLAN *v);
- CANCEL *VLanGetCancel(VLAN *v);
- bool VLanGetNextPacket(VLAN *v, void **buf, UINT *size);
- bool VLanPutPacket(VLAN *v, void *buf, UINT size);

+ 0 - 55
package/softether/0013-fix-build-on-freebsd-version-140091.patch

@@ -1,55 +0,0 @@
-From dcdbce63d51651d6d3d1d8a95c43d04258295621 Mon Sep 17 00:00:00 2001
-From: Koichiro Iwao <meta@vmeta.jp>
-Date: Mon, 3 Jul 2023 16:49:08 +0900
-Subject: [PATCH] Fix build on __FreeBSD_version >= 140091 (LLVM 16)
-
-Fails to build after:
-https://cgit.freebsd.org/src/commit/?id=a681cba16d8967651a2146385ce44a2bfeb1c4c3
-
-As the commit title is "Bump __FreeBSD_version for llvm 16.0.6 merge",
-I suppose LLVM 16 is stricter than LLVM 15. It was building successfully
-at least the previous week.
-
-Build log: https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p4785b313b958_se8efee297c/logs/softether5-5.02.5180.335,2.log
-
-```
-[ 32%] Building C object src/Mayaqua/CMakeFiles/mayaqua.dir/Unix.c.o
-cd /wrkdirs/usr/ports/security/softether5/work/.build/src/Mayaqua && /usr/bin/cc -DBRIDGE_BPF -DCPU_64 -DHAVE_SSL_CTX_SET_NUM_TICKETS -DNDEBUG -DOS_UNIX -DREENTRANT -DSE_DBDIR=\"/var/db/softether\" -DSE_LOGDIR=\"/var/log/softether\" -DSE_PIDDIR=\"/var/run/softether\" -DSE_TAGNAME=\"5.02.5180-335-g1c0bdb0c/freebsd\" -DTHREADSAFE -DTHREAD_SAFE -DUNIX -DUNIX_BSD -DVPN_SPEED -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREADSAFE -D_THREAD_SAFE -Dmayaqua_EXPORTS -I/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/. -I/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/Mayaqua/. -I/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/libhamcore/include -O2 -pipe  -I/usr/local/include/cpu_features -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fsigned-char -O2 -pipe  -I/usr/local/include/cpu_features -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -O2 -std=gnu99 -fPIC -pthread -MD -MT src/Mayaqua/CMakeFiles/mayaqua.dir/Unix.c.o -MF CMakeFiles/mayaqua.dir/Unix.c.o.d -o CMakeFiles/mayaqua.dir/Unix.c.o -c /wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/Mayaqua/Unix.c
-/wrkdirs/usr/ports/security/softether5/work/SoftEtherVPN-5.02.5180-335-g1c0bdb0c/src/Mayaqua/Unix.c:259:18: error: incompatible function pointer types assigning to 'void (*)(int, struct __siginfo *, void *)' from 'void *(int, siginfo_t *, void *)' (aka 'void *(int, struct __siginfo *, void *)') [-Wincompatible-function-pointer-types]
-        sa.sa_sigaction = signal_received_for_ignore;
-                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
-```
-
-Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/5633314981937671f2f2e6fefc4e8f9440888671
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- src/Mayaqua/Unix.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/Mayaqua/Unix.c b/src/Mayaqua/Unix.c
-index 0a3d33099..bd1263c96 100755
---- a/src/Mayaqua/Unix.c
-+++ b/src/Mayaqua/Unix.c
-@@ -244,9 +244,11 @@ OS_DISPATCH_TABLE *UnixGetDispatchTable()
- 	return &t;
- }
- 
--static void *signal_received_for_ignore(int sig, siginfo_t *info, void *ucontext) 
-+static void signal_received_for_ignore(int sig, siginfo_t *info, void *ucontext)
- {
--	return NULL;
-+	(void)sig;
-+	(void)info;
-+	(void)ucontext;
- }
- 
- // Ignore the signal flew to the thread
-@@ -256,7 +258,7 @@ void UnixIgnoreSignalForThread(int sig)
- 
- 	Zero(&sa, sizeof(sa));
- 	sa.sa_handler = NULL;
--	sa.sa_sigaction = signal_received_for_ignore;
-+	sa.sa_sigaction = &signal_received_for_ignore;
- 	sa.sa_flags = SA_SIGINFO;
- 
- 	sigemptyset(&sa.sa_mask);

+ 0 - 193
package/softether/0014-cedar-hub-properly-set-value-for-hub-admin-options.patch

@@ -1,193 +0,0 @@
-From 2078a069de12c05ed317a45d6bfe3a2dc7565802 Mon Sep 17 00:00:00 2001
-From: Davide Beatrici <git@davidebeatrici.dev>
-Date: Sun, 28 Feb 2021 07:19:41 +0100
-Subject: [PATCH] Cedar/Hub: Properly set value for hub admin options
-
-Same deal as with the previous commit: worked fine as long as bool was 4-bytes wide.
-
-Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/2078a069de12c05ed317a45d6bfe3a2dc7565802
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- src/Cedar/Hub.c | 142 +++++++++++++++++++++++-------------------------
- src/Cedar/Hub.h |   1 -
- 2 files changed, 67 insertions(+), 76 deletions(-)
-
-diff --git a/src/Cedar/Hub.c b/src/Cedar/Hub.c
-index 184f33127..ac36052a1 100644
---- a/src/Cedar/Hub.c
-+++ b/src/Cedar/Hub.c
-@@ -7,6 +7,13 @@
- 
- #include "CedarPch.h"
- 
-+#define GetHubAdminOptionDataAndSet(ao, name, dest) \
-+	value = GetHubAdminOptionData(ao, name);        \
-+	if (value != INFINITE)                          \
-+	{                                               \
-+		dest = value;                               \
-+	}
-+
- static UCHAR broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
- static char vgs_ua_str[9] = {0};
- static bool g_vgs_emb_tag = false;
-@@ -516,23 +523,6 @@ UINT GetHubAdminOptionData(RPC_ADMIN_OPTION *ao, char *name)
- 
- 	return INFINITE;
- }
--void GetHubAdminOptionDataAndSet(RPC_ADMIN_OPTION *ao, char *name, UINT *dest)
--{
--	UINT value;
--	// Validate arguments
--	if (ao == NULL || name == NULL || dest == NULL)
--	{
--		return;
--	}
--
--	value = GetHubAdminOptionData(ao, name);
--	if (value == INFINITE)
--	{
--		return;
--	}
--
--	*dest = value;
--}
- 
- // Set the contents of the HUB_OPTION based on the data
- void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
-@@ -543,64 +533,66 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
- 		return;
- 	}
- 
--	GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv4", &o->NoArpPolling);
--	GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv6", &o->NoIPv6AddrPolling);
--	GetHubAdminOptionDataAndSet(ao, "NoIpTable", &o->NoIpTable);
--	GetHubAdminOptionDataAndSet(ao, "NoMacAddressLog", &o->NoMacAddressLog);
--	GetHubAdminOptionDataAndSet(ao, "ManageOnlyPrivateIP", &o->ManageOnlyPrivateIP);
--	GetHubAdminOptionDataAndSet(ao, "ManageOnlyLocalUnicastIPv6", &o->ManageOnlyLocalUnicastIPv6);
--	GetHubAdminOptionDataAndSet(ao, "DisableIPParsing", &o->DisableIPParsing);
--	GetHubAdminOptionDataAndSet(ao, "YieldAfterStorePacket", &o->YieldAfterStorePacket);
--	GetHubAdminOptionDataAndSet(ao, "NoSpinLockForPacketDelay", &o->NoSpinLockForPacketDelay);
--	GetHubAdminOptionDataAndSet(ao, "BroadcastStormDetectionThreshold", &o->BroadcastStormDetectionThreshold);
--	GetHubAdminOptionDataAndSet(ao, "ClientMinimumRequiredBuild", &o->ClientMinimumRequiredBuild);
--	GetHubAdminOptionDataAndSet(ao, "FilterPPPoE", &o->FilterPPPoE);
--	GetHubAdminOptionDataAndSet(ao, "FilterOSPF", &o->FilterOSPF);
--	GetHubAdminOptionDataAndSet(ao, "FilterIPv4", &o->FilterIPv4);
--	GetHubAdminOptionDataAndSet(ao, "FilterIPv6", &o->FilterIPv6);
--	GetHubAdminOptionDataAndSet(ao, "FilterNonIP", &o->FilterNonIP);
--	GetHubAdminOptionDataAndSet(ao, "NoIPv4PacketLog", &o->NoIPv4PacketLog);
--	GetHubAdminOptionDataAndSet(ao, "NoIPv6PacketLog", &o->NoIPv6PacketLog);
--	GetHubAdminOptionDataAndSet(ao, "FilterBPDU", &o->FilterBPDU);
--	GetHubAdminOptionDataAndSet(ao, "NoIPv6DefaultRouterInRAWhenIPv6", &o->NoIPv6DefaultRouterInRAWhenIPv6);
--	GetHubAdminOptionDataAndSet(ao, "NoLookBPDUBridgeId", &o->NoLookBPDUBridgeId);
--	GetHubAdminOptionDataAndSet(ao, "NoManageVlanId", &o->NoManageVlanId);
--	GetHubAdminOptionDataAndSet(ao, "VlanTypeId", &o->VlanTypeId);
--	GetHubAdminOptionDataAndSet(ao, "FixForDLinkBPDU", &o->FixForDLinkBPDU);
--	GetHubAdminOptionDataAndSet(ao, "RequiredClientId", &o->RequiredClientId);
--	GetHubAdminOptionDataAndSet(ao, "AdjustTcpMssValue", &o->AdjustTcpMssValue);
--	GetHubAdminOptionDataAndSet(ao, "DisableAdjustTcpMss", &o->DisableAdjustTcpMss);
--	GetHubAdminOptionDataAndSet(ao, "NoDhcpPacketLogOutsideHub", &o->NoDhcpPacketLogOutsideHub);
--	GetHubAdminOptionDataAndSet(ao, "DisableHttpParsing", &o->DisableHttpParsing);
--	GetHubAdminOptionDataAndSet(ao, "DisableUdpAcceleration", &o->DisableUdpAcceleration);
--	GetHubAdminOptionDataAndSet(ao, "DisableUdpFilterForLocalBridgeNic", &o->DisableUdpFilterForLocalBridgeNic);
--	GetHubAdminOptionDataAndSet(ao, "ApplyIPv4AccessListOnArpPacket", &o->ApplyIPv4AccessListOnArpPacket);
--	GetHubAdminOptionDataAndSet(ao, "RemoveDefGwOnDhcpForLocalhost", &o->RemoveDefGwOnDhcpForLocalhost);
--	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSessionsPerIp", &o->SecureNAT_MaxTcpSessionsPerIp);
--	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSynSentPerIp", &o->SecureNAT_MaxTcpSynSentPerIp);
--	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxUdpSessionsPerIp", &o->SecureNAT_MaxUdpSessionsPerIp);
--	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxDnsSessionsPerIp", &o->SecureNAT_MaxDnsSessionsPerIp);
--	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxIcmpSessionsPerIp", &o->SecureNAT_MaxIcmpSessionsPerIp);
--	GetHubAdminOptionDataAndSet(ao, "AccessListIncludeFileCacheLifetime", &o->AccessListIncludeFileCacheLifetime);
--	GetHubAdminOptionDataAndSet(ao, "DisableKernelModeSecureNAT", &o->DisableKernelModeSecureNAT);
--	GetHubAdminOptionDataAndSet(ao, "DisableIpRawModeSecureNAT", &o->DisableIpRawModeSecureNAT);
--	GetHubAdminOptionDataAndSet(ao, "DisableUserModeSecureNAT", &o->DisableUserModeSecureNAT);
--	GetHubAdminOptionDataAndSet(ao, "DisableCheckMacOnLocalBridge", &o->DisableCheckMacOnLocalBridge);
--	GetHubAdminOptionDataAndSet(ao, "DisableCorrectIpOffloadChecksum", &o->DisableCorrectIpOffloadChecksum);
--	GetHubAdminOptionDataAndSet(ao, "BroadcastLimiterStrictMode", &o->BroadcastLimiterStrictMode);
--	GetHubAdminOptionDataAndSet(ao, "MaxLoggedPacketsPerMinute", &o->MaxLoggedPacketsPerMinute);
--	GetHubAdminOptionDataAndSet(ao, "DoNotSaveHeavySecurityLogs", &o->DoNotSaveHeavySecurityLogs);
--	GetHubAdminOptionDataAndSet(ao, "DropBroadcastsInPrivacyFilterMode", &o->DropBroadcastsInPrivacyFilterMode);
--	GetHubAdminOptionDataAndSet(ao, "DropArpInPrivacyFilterMode", &o->DropArpInPrivacyFilterMode);
--	GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", &o->SuppressClientUpdateNotification);
--	GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", &o->FloodingSendQueueBufferQuota);
--	GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", &o->AssignVLanIdByRadiusAttribute);
--	GetHubAdminOptionDataAndSet(ao, "DenyAllRadiusLoginWithNoVlanAssign", &o->DenyAllRadiusLoginWithNoVlanAssign);
--	GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", &o->SecureNAT_RandomizeAssignIp);
--	GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", &o->DetectDormantSessionInterval);
--	GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", &o->NoPhysicalIPOnPacketLog);
--	GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", &o->UseHubNameAsDhcpUserClassOption);
--	GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", &o->UseHubNameAsRadiusNasId);
-+	UINT value;
-+
-+	GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv4", o->NoArpPolling);
-+	GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv6", o->NoIPv6AddrPolling);
-+	GetHubAdminOptionDataAndSet(ao, "NoIpTable", o->NoIpTable);
-+	GetHubAdminOptionDataAndSet(ao, "NoMacAddressLog", o->NoMacAddressLog);
-+	GetHubAdminOptionDataAndSet(ao, "ManageOnlyPrivateIP", o->ManageOnlyPrivateIP);
-+	GetHubAdminOptionDataAndSet(ao, "ManageOnlyLocalUnicastIPv6", o->ManageOnlyLocalUnicastIPv6);
-+	GetHubAdminOptionDataAndSet(ao, "DisableIPParsing", o->DisableIPParsing);
-+	GetHubAdminOptionDataAndSet(ao, "YieldAfterStorePacket", o->YieldAfterStorePacket);
-+	GetHubAdminOptionDataAndSet(ao, "NoSpinLockForPacketDelay", o->NoSpinLockForPacketDelay);
-+	GetHubAdminOptionDataAndSet(ao, "BroadcastStormDetectionThreshold", o->BroadcastStormDetectionThreshold);
-+	GetHubAdminOptionDataAndSet(ao, "ClientMinimumRequiredBuild", o->ClientMinimumRequiredBuild);
-+	GetHubAdminOptionDataAndSet(ao, "FilterPPPoE", o->FilterPPPoE);
-+	GetHubAdminOptionDataAndSet(ao, "FilterOSPF", o->FilterOSPF);
-+	GetHubAdminOptionDataAndSet(ao, "FilterIPv4", o->FilterIPv4);
-+	GetHubAdminOptionDataAndSet(ao, "FilterIPv6", o->FilterIPv6);
-+	GetHubAdminOptionDataAndSet(ao, "FilterNonIP", o->FilterNonIP);
-+	GetHubAdminOptionDataAndSet(ao, "NoIPv4PacketLog", o->NoIPv4PacketLog);
-+	GetHubAdminOptionDataAndSet(ao, "NoIPv6PacketLog", o->NoIPv6PacketLog);
-+	GetHubAdminOptionDataAndSet(ao, "FilterBPDU", o->FilterBPDU);
-+	GetHubAdminOptionDataAndSet(ao, "NoIPv6DefaultRouterInRAWhenIPv6", o->NoIPv6DefaultRouterInRAWhenIPv6);
-+	GetHubAdminOptionDataAndSet(ao, "NoLookBPDUBridgeId", o->NoLookBPDUBridgeId);
-+	GetHubAdminOptionDataAndSet(ao, "NoManageVlanId", o->NoManageVlanId);
-+	GetHubAdminOptionDataAndSet(ao, "VlanTypeId", o->VlanTypeId);
-+	GetHubAdminOptionDataAndSet(ao, "FixForDLinkBPDU", o->FixForDLinkBPDU);
-+	GetHubAdminOptionDataAndSet(ao, "RequiredClientId", o->RequiredClientId);
-+	GetHubAdminOptionDataAndSet(ao, "AdjustTcpMssValue", o->AdjustTcpMssValue);
-+	GetHubAdminOptionDataAndSet(ao, "DisableAdjustTcpMss", o->DisableAdjustTcpMss);
-+	GetHubAdminOptionDataAndSet(ao, "NoDhcpPacketLogOutsideHub", o->NoDhcpPacketLogOutsideHub);
-+	GetHubAdminOptionDataAndSet(ao, "DisableHttpParsing", o->DisableHttpParsing);
-+	GetHubAdminOptionDataAndSet(ao, "DisableUdpAcceleration", o->DisableUdpAcceleration);
-+	GetHubAdminOptionDataAndSet(ao, "DisableUdpFilterForLocalBridgeNic", o->DisableUdpFilterForLocalBridgeNic);
-+	GetHubAdminOptionDataAndSet(ao, "ApplyIPv4AccessListOnArpPacket", o->ApplyIPv4AccessListOnArpPacket);
-+	GetHubAdminOptionDataAndSet(ao, "RemoveDefGwOnDhcpForLocalhost", o->RemoveDefGwOnDhcpForLocalhost);
-+	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSessionsPerIp", o->SecureNAT_MaxTcpSessionsPerIp);
-+	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSynSentPerIp", o->SecureNAT_MaxTcpSynSentPerIp);
-+	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxUdpSessionsPerIp", o->SecureNAT_MaxUdpSessionsPerIp);
-+	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxDnsSessionsPerIp", o->SecureNAT_MaxDnsSessionsPerIp);
-+	GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxIcmpSessionsPerIp", o->SecureNAT_MaxIcmpSessionsPerIp);
-+	GetHubAdminOptionDataAndSet(ao, "AccessListIncludeFileCacheLifetime", o->AccessListIncludeFileCacheLifetime);
-+	GetHubAdminOptionDataAndSet(ao, "DisableKernelModeSecureNAT", o->DisableKernelModeSecureNAT);
-+	GetHubAdminOptionDataAndSet(ao, "DisableIpRawModeSecureNAT", o->DisableIpRawModeSecureNAT);
-+	GetHubAdminOptionDataAndSet(ao, "DisableUserModeSecureNAT", o->DisableUserModeSecureNAT);
-+	GetHubAdminOptionDataAndSet(ao, "DisableCheckMacOnLocalBridge", o->DisableCheckMacOnLocalBridge);
-+	GetHubAdminOptionDataAndSet(ao, "DisableCorrectIpOffloadChecksum", o->DisableCorrectIpOffloadChecksum);
-+	GetHubAdminOptionDataAndSet(ao, "BroadcastLimiterStrictMode", o->BroadcastLimiterStrictMode);
-+	GetHubAdminOptionDataAndSet(ao, "MaxLoggedPacketsPerMinute", o->MaxLoggedPacketsPerMinute);
-+	GetHubAdminOptionDataAndSet(ao, "DoNotSaveHeavySecurityLogs", o->DoNotSaveHeavySecurityLogs);
-+	GetHubAdminOptionDataAndSet(ao, "DropBroadcastsInPrivacyFilterMode", o->DropBroadcastsInPrivacyFilterMode);
-+	GetHubAdminOptionDataAndSet(ao, "DropArpInPrivacyFilterMode", o->DropArpInPrivacyFilterMode);
-+	GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", o->SuppressClientUpdateNotification);
-+	GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", o->FloodingSendQueueBufferQuota);
-+	GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute);
-+	GetHubAdminOptionDataAndSet(ao, "DenyAllRadiusLoginWithNoVlanAssign", o->DenyAllRadiusLoginWithNoVlanAssign);
-+	GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", o->SecureNAT_RandomizeAssignIp);
-+	GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", o->DetectDormantSessionInterval);
-+	GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", o->NoPhysicalIPOnPacketLog);
-+	GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption);
-+	GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", o->UseHubNameAsRadiusNasId);
- }
- 
- // Convert the contents of the HUB_OPTION to data
-diff --git a/src/Cedar/Hub.h b/src/Cedar/Hub.h
-index 2c2dc66a5..8d077f35e 100644
---- a/src/Cedar/Hub.h
-+++ b/src/Cedar/Hub.h
-@@ -519,7 +519,6 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name);
- ADMIN_OPTION *NewAdminOption(char *name, UINT value);
- void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao);
- UINT GetHubAdminOptionData(RPC_ADMIN_OPTION *ao, char *name);
--void GetHubAdminOptionDataAndSet(RPC_ADMIN_OPTION *ao, char *name, UINT *dest);
- bool IsURLMsg(wchar_t *str, char *url, UINT url_size);
- LIST *NewUserList();
- void DeleteAllUserListCache(LIST *o);

+ 0 - 93
package/softether/0015-adjust-types-of-variables.patch

@@ -1,93 +0,0 @@
-From 60ee4630442c4458896553060c795732fd4a04de Mon Sep 17 00:00:00 2001
-From: Ilya Shipitsin <chipitsine@gmail.com>
-Date: Fri, 23 Feb 2024 11:06:27 +0100
-Subject: [PATCH] adjust types of variables
-
-gcc14 is not happy on "error: passing argument .. from incompatible pointer type [-Wincompatible-pointer-types]"
-
-Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/commit/60ee4630442c4458896553060c795732fd4a04de
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- src/Mayaqua/pkcs11f.h | 6 +++---
- src/Mayaqua/pkcs11t.h | 9 ++++++---
- 2 files changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/src/Mayaqua/pkcs11f.h b/src/Mayaqua/pkcs11f.h
-index 300975352..33550c3dd 100644
---- a/src/Mayaqua/pkcs11f.h
-+++ b/src/Mayaqua/pkcs11f.h
-@@ -73,7 +73,7 @@ CK_PKCS11_FUNCTION_INFO(C_GetSlotList)
- (
-   CK_BBOOL       tokenPresent,  /* only slots with tokens? */
-   CK_SLOT_ID_PTR pSlotList,     /* receives array of slot IDs */
--  CK_ULONG_PTR   pulCount       /* receives number of slots */
-+  CK_UINT_PTR   pulCount       /* receives number of slots */
- );
- #endif
- 
-@@ -351,7 +351,7 @@ CK_PKCS11_FUNCTION_INFO(C_FindObjects)
-  CK_SESSION_HANDLE    hSession,          /* session's handle */
-  CK_OBJECT_HANDLE_PTR phObject,          /* gets obj. handles */
-  CK_ULONG             ulMaxObjectCount,  /* max handles to get */
-- CK_ULONG_PTR         pulObjectCount     /* actual # returned */
-+ CK_UINT_PTR         pulObjectCount     /* actual # returned */
- );
- #endif
- 
-@@ -558,7 +558,7 @@ CK_PKCS11_FUNCTION_INFO(C_Sign)
-   CK_BYTE_PTR       pData,           /* the data to sign */
-   CK_ULONG          ulDataLen,       /* count of bytes to sign */
-   CK_BYTE_PTR       pSignature,      /* gets the signature */
--  CK_ULONG_PTR      pulSignatureLen  /* gets signature length */
-+  CK_UINT_PTR      pulSignatureLen  /* gets signature length */
- );
- #endif
- 
-diff --git a/src/Mayaqua/pkcs11t.h b/src/Mayaqua/pkcs11t.h
-index c04b57192..f157ce738 100644
---- a/src/Mayaqua/pkcs11t.h
-+++ b/src/Mayaqua/pkcs11t.h
-@@ -51,6 +51,8 @@ typedef CK_BYTE           CK_BBOOL;
- /* an unsigned value, at least 32 bits long */
- typedef unsigned long int CK_ULONG;
- 
-+typedef unsigned int CK_UINT;
-+
- /* a signed value, the same size as a CK_ULONG */
- /* CK_LONG is new for v2.0 */
- typedef long int          CK_LONG;
-@@ -68,6 +70,7 @@ typedef CK_BYTE     CK_PTR   CK_BYTE_PTR;
- typedef CK_CHAR     CK_PTR   CK_CHAR_PTR;
- typedef CK_UTF8CHAR CK_PTR   CK_UTF8CHAR_PTR;
- typedef CK_ULONG    CK_PTR   CK_ULONG_PTR;
-+typedef CK_UINT     CK_PTR   CK_UINT_PTR;
- typedef void        CK_PTR   CK_VOID_PTR;
- 
- /* Pointer to a CK_VOID_PTR-- i.e., pointer to pointer to void */
-@@ -110,7 +113,7 @@ typedef CK_ULONG CK_NOTIFICATION;
- #define CKN_SURRENDER       0
- 
- 
--typedef CK_ULONG          CK_SLOT_ID;
-+typedef CK_UINT          CK_SLOT_ID;
- 
- typedef CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR;
- 
-@@ -262,7 +265,7 @@ typedef CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR;
- 
- /* CK_SESSION_HANDLE is a Cryptoki-assigned value that
-  * identifies a session */
--typedef CK_ULONG          CK_SESSION_HANDLE;
-+typedef CK_UINT          CK_SESSION_HANDLE;
- 
- typedef CK_SESSION_HANDLE CK_PTR CK_SESSION_HANDLE_PTR; 
- 
-@@ -310,7 +313,7 @@ typedef CK_SESSION_INFO CK_PTR CK_SESSION_INFO_PTR;
- 
- /* CK_OBJECT_HANDLE is a token-specific identifier for an
-  * object  */
--typedef CK_ULONG          CK_OBJECT_HANDLE;
-+typedef CK_UINT          CK_OBJECT_HANDLE;
- 
- typedef CK_OBJECT_HANDLE CK_PTR CK_OBJECT_HANDLE_PTR;
- 

+ 0 - 54
package/softether/0016-Cedar-Proto_IKE-fix-too-many-arguments-to-function-N.patch

@@ -1,54 +0,0 @@
-From f37845f6ab06d68ea6c669f150eab71ff20f21ff Mon Sep 17 00:00:00 2001
-From: Thomas Perale <thomas.perale@mind.be>
-Date: Wed, 9 Jul 2025 18:17:21 +0200
-Subject: [PATCH] Cedar/Proto_IKE: fix too many arguments to function 'NewBuf'
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This commit fixes the following error:
-
-```
-Proto_IKE.c: In function ‘ProcIkeQuickModePacketRecv’:
-Proto_IKE.c:2362:146: error: too many arguments to function ‘NewBuf’; expected 0, have 2
- 2362 |                                                                                                                         ipsec_sa_sc->SharedKey = NewBuf(shared_key, shared_key_size);
-      |                                                                                                                                                  ^~~~~~ ~~~~~~~~~~
-In file included from ../../src/Mayaqua/Mayaqua.h:338,
-                 from CedarPch.h:115,
-                 from IPsec_IKE.c:105:
-../../src/Mayaqua/Memory.h:303:6: note: declared here
-  303 | BUF *NewBuf();
-      |      ^~~~~~
-Proto_IKE.c:2363:146: error: too many arguments to function ‘NewBuf’; expected 0, have 2
- 2363 |                                                                                                                         ipsec_sa_cs->SharedKey = NewBuf(shared_key, shared_key_size);
-      |                                                                                                                                                  ^~~~~~ ~~~~~~~~~~
-```
-
-The function `NewBuf` is defined without arguments. Replace it in favour
-of `NewBufFromMemory` that copy the content of the pointer into a new
-buffer.
-
-Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN/pull/2135
-Signed-off-by: Thomas Perale <thomas.perale@mind.be>
----
- src/Cedar/IPsec_IKE.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Cedar/IPsec_IKE.c b/src/Cedar/IPsec_IKE.c
-index 5d407494..8234f100 100644
---- a/src/Cedar/IPsec_IKE.c
-+++ b/src/Cedar/IPsec_IKE.c
-@@ -2359,8 +2359,8 @@ void ProcIkeQuickModePacketRecv(IKE_SERVER *ike, UDPPACKET *p, IKE_PACKET *heade
- 														// Update the information of IPsec SA
- 														if (shared_key != NULL)
- 														{
--															ipsec_sa_sc->SharedKey = NewBuf(shared_key, shared_key_size);
--															ipsec_sa_cs->SharedKey = NewBuf(shared_key, shared_key_size);
-+															ipsec_sa_sc->SharedKey = NewBufFromMemory(shared_key, shared_key_size);
-+															ipsec_sa_cs->SharedKey = NewBufFromMemory(shared_key, shared_key_size);
- 														}
- 
- 														ipsec_sa_sc->Spi = setting.SpiServerToClient;
--- 
-2.50.0
-

+ 0 - 33
package/softether/Config.in

@@ -1,33 +0,0 @@
-config BR2_PACKAGE_SOFTETHER
-	bool "softether"
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_USE_MMU # fork()
-	depends on BR2_USE_WCHAR
-	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_OPENSSL
-	select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
-	select BR2_PACKAGE_LIBOPENSSL_ENABLE_DES
-	select BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4
-	select BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4
-	select BR2_PACKAGE_READLINE
-	help
-	  The SoftEther Server is a fully integrated implementation of
-	  the SSTP, L2TP, L2TPv3, OpenVPN, and IPSec virtual private
-	  networking protocols on Linux and several other
-	  platforms. It is generally compatible with other
-	  implementations by Apple, Cisco, Juniper, Microsoft, et al.
-
-	  Convenient Layer-2 and Layer-3 bridging capabilities can
-	  connect several branch offices into a single broadcast or
-	  routing domain, even behind a NAT or without a static IPv4
-	  address.
-
-	  In addition to supporting most VPN protocols, the SoftEther
-	  Client can penetrate hardened firewalls and captured
-	  gateways through HTTPS, DNS, and ICMP exfiltration.
-
-	  http://www.softether.org
-
-comment "softether needs a toolchain w/ wchar, threads"
-	depends on BR2_USE_MMU
-	depends on !(BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS)

+ 0 - 3
package/softether/softether.hash

@@ -1,3 +0,0 @@
-# Locally computed
-sha256  f579fa938f6d5d0622f23b3c163b3de5dc171e30175e44511bf269b3bb9fb1fc  softether-4.30-9700-beta.tar.gz
-sha256  5da6241ddb987c4543bf1cbba6b40a3cd3ecb624dbd4a63daf04440911656bde  LICENSE

+ 0 - 37
package/softether/softether.mk

@@ -1,37 +0,0 @@
-################################################################################
-#
-# softether
-#
-################################################################################
-
-SOFTETHER_VERSION = 4.30-9700-beta
-SOFTETHER_SITE = $(call github,SoftEtherVPN,SoftEtherVPN_stable,v$(SOFTETHER_VERSION))
-SOFTETHER_LICENSE = Apache-2.0
-SOFTETHER_LICENSE_FILES = LICENSE
-SOFTETHER_DEPENDENCIES = host-pkgconf host-softether libopenssl readline
-SOFTETHER_AUTORECONF = YES
-
-ifeq ($(BR2_ENABLE_LOCALE),)
-SOFTETHER_DEPENDENCIES += libiconv
-SOFTETHER_CONF_ENV = LIBS+=" -liconv"
-endif
-
-SOFTETHER_CONF_OPTS = --with-zlib="$(STAGING_DIR)/usr"
-
-# host-libiconv does not exist, therefore we need this extra line
-HOST_SOFTETHER_DEPENDENCIES = host-pkgconf host-libopenssl host-readline
-
-# target build creates the file hamcore.se2 which needs the host variant of
-# hamcorebuilder, for details see http://www.vpnusers.com/viewtopic.php?p=5426
-define HOST_SOFTETHER_BUILD_CMDS
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/src/Mayaqua
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/src/Cedar
-	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/src/hamcorebuilder
-endef
-
-define HOST_SOFTETHER_INSTALL_CMDS
-	$(INSTALL) -m 0755 $(@D)/src/hamcorebuilder/hamcorebuilder $(HOST_DIR)/bin/hamcorebuilder
-endef
-
-$(eval $(autotools-package))
-$(eval $(host-autotools-package))