From: "flichtenheld (Code Review)"
Date: Mon, 13 May 2024 11:04:13 +0000
In-Reply-To:
References:
Reply-To: frank@...2641..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, gert@...1296...
Message-ID: <99bcd311edd093901eb26cfd3196380e455025e2-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="j+uwxYpQhho="; charset=UTF-8
Subject: [Openvpn-devel] [S] Change in openvpn[master]: configure: Try to
detect LZO with pkg-config
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: plaisthos
Cc: cron2 , openvpn-devel
--j+uwxYpQhho=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, plaisthos.
Hello plaisthos,
I'd like you to reexamine a change. Please visit
http://gerrit.openvpn.net/c/openvpn/+/556?usp=3Demail
to look at the new patch set (#4).
Change subject: configure: Try to detect LZO with pkg-config
......................................................................
configure: Try to detect LZO with pkg-config
On most systems this should work just fine.
v2:
- simplify code by removing -llzo special handling
v3:
- reintroduce support for autodetection without pkg-config,
no need to break backwards compatibility right now
Change-Id: I1c038dc4ec80d3499582d81eee61fee74f26e693
Signed-off-by: Frank Lichtenheld
---
M configure.ac
1 file changed, 15 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/56/556/4
diff --git a/configure.ac b/configure.ac
index ce8b2b0..d834f30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,8 +1143,17 @@
AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo])
AC_ARG_VAR([LZO_LIBS], [linker flags for lzo])
-have_lzo=3D"yes"
-if test -z "${LZO_LIBS}"; then
+if test -z "${LZO_CFLAGS}" -a -z "${LZO_LIBS}"; then
+ # if the user did not explicitly specify flags, try to autodetect
+ PKG_CHECK_MODULES([LZO],
+ [lzo2],
+ [have_lzo=3D"yes"],
+ []
+ )
+
+ if test "${have_lzo}" !=3D "yes"; then
+ # try to detect without pkg-config
+ have_lzo=3D"yes"
AC_CHECK_LIB(
[lzo2],
[lzo1x_1_15_compress],
@@ -1156,6 +1165,10 @@
[have_lzo=3D"no"]
)]
)
+ fi
+else
+ # assume the user configured it correctly
+ have_lzo=3D"yes"
fi
if test "${have_lzo}" =3D "yes"; then
saved_CFLAGS=3D"${CFLAGS}"
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/556?usp=3Demail
To unsubscribe, or for help writing mail filters, visit http://gerrit.openv=
pn.net/settings
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c038dc4ec80d3499582d81eee61fee74f26e693
Gerrit-Change-Number: 556
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: cron2
Gerrit-CC: openvpn-devel
Gerrit-Attention: plaisthos
Gerrit-Attention: cron2
Gerrit-MessageType: newpatchset
--j+uwxYpQhho=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: cron2, plaisthos.
flichtenheld uploaded patch set #4 to this change.
<=
p>View Ch=
ange
configure: Try to detect LZO with pkg-config
On most system=
s this should work just fine.
v2:
- simplify code by removing -l=
lzo special handling
v3:
- reintroduce support for autodetection wit=
hout pkg-config,
no need to break backwards compatibility right now
Change-Id: I1c038dc4ec80d3499582d81eee61fee74f26e693
Signed-off-by=
: Frank Lichtenheld <frank@...2641...>
---
M configure.ac
1 =
file changed, 15 insertions(+), 2 deletions(-)
git pull ssh://ger=
rit.openvpn.net:29418/openvpn refs/changes/56/556/4
diff --git a/co=
nfigure.ac b/configure.ac
index ce8b2b0..d834f30 100644
--- a/configure.ac
+++ b/configure.ac@@ -1143,8 +1143,17 @@
AC_ARG_VA=
R([LZO_CFLAGS], [C compiler flags for lzo])
AC_ARG_VAR([LZ=
O_LIBS], [linker flags for lzo])
-have_lzo=3D"yes"
-if test -z "${LZO_LIBS}"; then
+if test -z "${LZO_CFLAGS}" -=
a -z "${LZO_LIBS}"; then
+ # if the user did not explicitly specify flags, try to a=
utodetect
+ PKG_CH=
ECK_MODULES([LZO],
+ =
[lzo2],
+ [have_lzo=
=3D"yes"],
=
+ []
+ )+
+ if test "${have_lzo}" !=3D "=
yes"; then
+ # t=
ry to detect without pkg-config
+ have_lzo=3D"yes"
AC_CHECK_LIB(
[lzo2],
[lzo1x_1_15_compress],
@@ -1156,6 +1165,10 @@
[have_lzo=3D"no"=
;]
)]
)
+ fi
+else
+ =
# assume the user configured it correctly
+ have_lzo=3D"yes"
fi=
span>
if test "${have_lzo}" =3D "yes"; then=
span>
saved_CFLAGS=3D"${CFLAGS}"
To view, visit change 556. To unsubscribe, or for help writing ma=
il filters, visit settings=
a>.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c038dc4ec80d3499582d81eee6=
1fee74f26e693
Gerrit-Change-Number: 556
Gerrit-PatchSet: 4
Gerrit-Owner: flichtenheld <frank@...2723...=
.>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...=
.1227...>
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...=
ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...=
..1227...>
Gerrit-Attention: cron2 <gert@...1296...>=
;
Gerrit-MessageType: newpatchset
--j+uwxYpQhho=--