summaryrefslogtreecommitdiff
path: root/net-vpn/openfortivpn/files/openfortivpn-1.23.1-automagic.patch
blob: ca7c0147e1536bd404a0f28ebcbd261328dfacc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
commit e6d4329aeb2b96da8b56c6a2dd0dd64a9090f8c7
Author: Johannes Huber <johu@gmx.de>
Date:   Tue May 20 16:52:26 2025 +0200

    fix automagic build against systemd

diff --git a/configure.ac b/configure.ac
index 8701d23..2a182fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,13 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 PKG_CHECK_MODULES(OPENSSL, [libssl >= 1.0.2 libcrypto >= 1.0.2], [], [AC_MSG_ERROR([Cannot find OpenSSL 1.0.2 or higher.])])
 AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_ERROR([Cannot find libpthread.])])
 AC_CHECK_LIB([util], [forkpty], [], [AC_MSG_ERROR([Cannot find libutil.])])
-PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd], [AC_DEFINE(HAVE_SYSTEMD)], [AC_MSG_RESULT([libsystemd not present])])
+
+AC_ARG_ENABLE([systemd],
+	AS_HELP_STRING([--enable-systemd], [build with systemd support]))
+
+AS_IF([test "x$enable_systemd" = "xyes"], [
+	PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd], [AC_DEFINE(HAVE_SYSTEMD)], [AC_MSG_RESULT([libsystemd not present])])
+])
 
 # we assume presence of the following C standard headers
 # and omit them in the following header checks