2012-03-28 10:34:47 +00:00
|
|
|
dnl OpenVPN-GUI -- A Windows GUI for OpenVPN.
|
|
|
|
dnl
|
|
|
|
dnl Copyright (C) 2004 Mathias Sundman <mathias@nilings.se>
|
|
|
|
dnl 2010 Heiko Hund <heikoh@users.sf.net>
|
|
|
|
dnl
|
|
|
|
dnl This program is free software; you can redistribute it and/or modify
|
|
|
|
dnl it under the terms of the GNU General Public License as published by
|
|
|
|
dnl the Free Software Foundation; either version 2 of the License, or
|
|
|
|
dnl (at your option) any later version.
|
|
|
|
dnl
|
|
|
|
dnl This program is distributed in the hope that it will be useful,
|
|
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
dnl GNU General Public License for more details.
|
|
|
|
dnl
|
|
|
|
dnl You should have received a copy of the GNU General Public License
|
|
|
|
dnl along with this program (see the file COPYING included with this
|
|
|
|
dnl distribution); if not, write to the Free Software Foundation, Inc.,
|
|
|
|
dnl 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2010-03-11 15:52:53 +00:00
|
|
|
|
2012-03-28 10:34:47 +00:00
|
|
|
AC_PREREQ(2.59)
|
2016-11-18 01:09:24 +00:00
|
|
|
define([_GUI_VERSION_MAJOR], [11])
|
2022-05-31 11:51:57 +00:00
|
|
|
define([_GUI_VERSION_MINOR], [29])
|
2016-11-18 01:09:24 +00:00
|
|
|
AC_INIT([OpenVPN GUI],[_GUI_VERSION_MAJOR],[openvpn-devel@lists.sourceforge.net],[openvpn-gui],[https://github.com/openvpn/openvpn-gui/])
|
|
|
|
AC_DEFINE([PACKAGE_VERSION_RESOURCE], [_GUI_VERSION_MAJOR,_GUI_VERSION_MINOR,0,0], [Version in windows resource format])
|
2016-11-18 22:45:21 +00:00
|
|
|
AC_DEFINE([PACKAGE_VERSION_RESOURCE_STR], ["_GUI_VERSION_MAJOR._GUI_VERSION_MINOR.0.0"], [Version as a string])
|
2020-08-13 16:19:27 +00:00
|
|
|
AC_DEFINE([GUI_COPYRIGHT_YEAR_END], ["2020"], [Last copyright year for GUI in About tab])
|
|
|
|
AC_DEFINE([CORE_COPYRIGHT_YEAR_END], ["2020"], [Last copyright year for daemon in About tab])
|
2012-03-28 10:34:47 +00:00
|
|
|
AC_CONFIG_AUX_DIR([.])
|
|
|
|
AM_CONFIG_HEADER([config.h])
|
|
|
|
AC_CONFIG_SRCDIR([main.h])
|
2022-07-11 03:39:09 +00:00
|
|
|
AM_INIT_AUTOMAKE([subdir-objects])
|
2011-07-26 12:33:56 +00:00
|
|
|
AC_CANONICAL_HOST
|
2012-03-28 10:34:47 +00:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
AC_PROG_CC_C99
|
2022-10-07 01:13:42 +00:00
|
|
|
AC_PROG_CXX
|
2011-07-26 07:01:55 +00:00
|
|
|
AC_CHECK_TOOL([WINDRES], [windres])
|
2022-07-11 03:39:09 +00:00
|
|
|
LT_INIT([win32-dll])
|
|
|
|
LT_LANG([Windows Resource])
|
2009-01-07 12:51:01 +00:00
|
|
|
|
2012-03-28 10:34:47 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[distonly],
|
|
|
|
[AS_HELP_STRING([--enable-distonly], [enable distribute only mode @<:@default=no@:>@])],
|
|
|
|
,
|
|
|
|
[enable_distonly="no"]
|
|
|
|
)
|
2009-01-07 12:51:01 +00:00
|
|
|
|
2016-08-01 20:22:05 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[password-change],
|
|
|
|
[AS_HELP_STRING([--disable-password-change], [disable password change support @<:@default=yes@:>@])],
|
|
|
|
,
|
|
|
|
[enable_password_change="yes"]
|
|
|
|
)
|
|
|
|
|
2019-12-26 14:14:23 +00:00
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[ovpn3],
|
|
|
|
[AS_HELP_STRING([--enable-ovpn3], [enable openvpn3 agent and client @<:@default=no@:>@])],
|
|
|
|
[
|
|
|
|
AC_DEFINE([ENABLE_OVPN3], 1, [Use openvpn3 agent instead of interactive service])
|
|
|
|
PKG_CHECK_MODULES([JSON], [json-c])
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2012-03-28 10:34:47 +00:00
|
|
|
case "$host" in
|
|
|
|
*-mingw*)
|
|
|
|
CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN"
|
2016-12-15 18:47:08 +00:00
|
|
|
CPPFLAGS="${CPPFLAGS} -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DWINVER=_WIN32_WINNT"
|
2017-01-18 07:46:47 +00:00
|
|
|
LDFLAGS="${LDFLAGS} -Wl,--nxcompat,--dynamicbase"
|
2017-01-18 07:57:13 +00:00
|
|
|
|
|
|
|
dnl older mingw doesn't support `--high-entropy-va`
|
|
|
|
_save_ldflags="$LDFLAGS"
|
|
|
|
LDFLAGS="-Wl,--high-entropy-va"
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([])],[AS_VAR_SET(high_entropy_aslr,[yes])],)
|
|
|
|
LDFLAGS="$_save_ldflags"
|
|
|
|
AS_VAR_IF(high_entropy_aslr,[yes],[LDFLAGS="${LDFLAGS} -Wl,--high-entropy-va"],)
|
2012-03-28 10:34:47 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
test "${enable_distonly}" = "no" && AC_MSG_ERROR([This project is supported for windows only.])
|
|
|
|
;;
|
|
|
|
esac
|
2009-01-07 12:51:01 +00:00
|
|
|
|
2022-06-27 21:33:06 +00:00
|
|
|
AC_CHECK_LIB(cryptui, CryptUIDlgViewContext)
|
|
|
|
|
2012-03-28 10:34:47 +00:00
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
2010-08-13 15:42:23 +00:00
|
|
|
|
2016-08-01 20:22:05 +00:00
|
|
|
if test "${enable_password_change}" = "yes"; then
|
|
|
|
PKG_PROG_PKG_CONFIG
|
2012-03-28 10:34:47 +00:00
|
|
|
PKG_CHECK_MODULES(
|
|
|
|
[OPENSSL_CRYPTO],
|
|
|
|
[libcrypto >= 0.9.6],
|
|
|
|
,
|
|
|
|
[AC_CHECK_LIB(
|
|
|
|
[crypto],
|
|
|
|
[RSA_new],
|
|
|
|
[OPENSSL_CRYPTO_LIBS="-lcrypto"],
|
|
|
|
[test "${enable_distonly}" = "no" && AC_MSG_ERROR([Cannot find OpenSSL library])]
|
|
|
|
)]
|
|
|
|
)
|
2016-08-01 20:22:05 +00:00
|
|
|
else
|
|
|
|
AC_DEFINE([DISABLE_CHANGE_PASSWORD],[1],[disable password change])
|
|
|
|
fi
|
2009-02-02 17:19:54 +00:00
|
|
|
|
2012-03-28 10:34:47 +00:00
|
|
|
test "${GCC}" = "yes" && CFLAGS="${CFLAGS} -pedantic -Wall -Wextra"
|
2009-01-07 12:51:01 +00:00
|
|
|
|
2022-07-11 03:39:09 +00:00
|
|
|
AC_CONFIG_FILES([Makefile plap/Makefile])
|
2009-01-07 12:51:01 +00:00
|
|
|
AC_OUTPUT
|