summaryrefslogtreecommitdiff
path: root/openvpn/configure.ac
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-06-02 15:45:11 +0200
committerArne Schwabe <arne@rfc2549.org>2012-06-02 15:45:11 +0200
commit4ddf2ac169fbb4931b5268962b02cdca33323ccd (patch)
treedae21582837ec7d1cdda84b482377c4e7ee7e929 /openvpn/configure.ac
parent9b069ae8b8c4c458559f400211a0cfbc44c63938 (diff)
bring openvpn in sync with openvpn git master and patches submitted to mailing list
Diffstat (limited to 'openvpn/configure.ac')
-rw-r--r--openvpn/configure.ac37
1 files changed, 35 insertions, 2 deletions
diff --git a/openvpn/configure.ac b/openvpn/configure.ac
index 399b4e78..913ace63 100644
--- a/openvpn/configure.ac
+++ b/openvpn/configure.ac
@@ -252,7 +252,7 @@ AC_ARG_WITH(
[with_crypto_library="openssl"]
)
-AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${host}", [A string representing our host])
+AC_DEFINE_UNQUOTED([TARGET_ALIAS], ["${host}"], [A string representing our host])
case "$host" in
*-*-linux*)
AC_DEFINE([TARGET_LINUX], [1], [Are we running on Linux?])
@@ -300,6 +300,7 @@ PKG_PROG_PKG_CONFIG
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
+AC_PROG_SED
AC_PROG_MAKE_SET
AC_ARG_VAR([IFCONFIG], [full path to ipconfig utility])
@@ -307,11 +308,13 @@ AC_ARG_VAR([ROUTE], [full path to route utility])
AC_ARG_VAR([IPROUTE], [full path to ip utility])
AC_ARG_VAR([NETSTAT], [path to netstat utility]) # tests
AC_ARG_VAR([MAN2HTML], [path to man2html utility])
+AC_ARG_VAR([GIT], [path to git utility])
AC_PATH_PROGS([IFCONFIG], [ifconfig],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin])
AC_PATH_PROGS([ROUTE], [route],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin])
AC_PATH_PROGS([IPROUTE], [ip],, [$PATH:/usr/local/sbin:/usr/sbin:/sbin])
AC_CHECK_PROGS([NETSTAT], [netstat], [netstat], [$PATH:/usr/local/sbin:/usr/sbin:/sbin:/etc]) # tests
AC_CHECK_PROGS([MAN2HTML], [man2html])
+AC_CHECK_PROGS([GIT], [git]) # optional
AC_DEFINE_UNQUOTED([IFCONFIG_PATH], ["$IFCONFIG"], [Path to ifconfig tool])
AC_DEFINE_UNQUOTED([IPROUTE_PATH], ["$IPROUTE"], [Path to iproute tool])
AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route tool])
@@ -365,7 +368,7 @@ AC_CHECK_HEADERS([ \
])
AC_CHECK_HEADERS([ \
sys/time.h sys/ioctl.h sys/stat.h \
- sys/mman.h sys/file.h \
+ sys/mman.h sys/file.h sys/wait.h \
unistd.h signal.h libgen.h stropts.h \
syslog.h pwd.h grp.h \
sys/sockio.h sys/uio.h linux/sockios.h \
@@ -734,6 +737,27 @@ if test -z "${POLARSSL_LIBS}"; then
)
fi
+if test "${with_crypto_library}" = "polarssl" ; then
+ AC_MSG_CHECKING([polarssl version])
+ old_CFLAGS="${CFLAGS}"
+ CFLAGS="${POLARSSL_CFLAGS} ${CFLAGS}"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <polarssl/version.h>
+ ]],
+ [[
+#if POLARSSL_VERSION_NUMBER <= 0x01010000
+#error invalid version
+#endif
+ ]]
+ )],
+ [AC_MSG_RESULT([ok])],
+ [AC_MSG_ERROR([invalid polarssl version])]
+ )
+ CFLAGS="${old_CFLAGS}"
+fi
+
AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo])
AC_ARG_VAR([LZO_LIBS], [linker flags for lzo])
have_lzo="yes"
@@ -781,6 +805,14 @@ PKG_CHECK_MODULES(
[]
)
+AC_MSG_CHECKING([git checkout])
+GIT_CHECKOUT="no"
+if test -n "${GIT}" -a -d "${srcdir}/.git"; then
+ AC_DEFINE([HAVE_CONFIG_VERSION_H], [1], [extra version available in config-version.h])
+ GIT_CHECKOUT="yes"
+fi
+AC_MSG_RESULT([${GIT_CHECKOUT}])
+
if test -n "${SP_PLATFORM_WINDOWS}"; then
AC_DEFINE_UNQUOTED([PATH_SEPARATOR], ['\\\\'], [Path separator]) #"
AC_DEFINE_UNQUOTED([PATH_SEPARATOR_STR], ["\\\\"], [Path separator]) #"
@@ -928,6 +960,7 @@ AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS])
AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS])
AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
+AM_CONDITIONAL([GIT_CHECKOUT], [test "${GIT_CHECKOUT}" = "yes"])
sampledir="\$(docdir)/sample"
AC_SUBST([sampledir])