From: "flichtenheld (Code Review)"
Date: Wed, 8 May 2024 14:19:41 +0000
In-Reply-To:
References:
Reply-To: frank@...2641..., arne-openvpn@...1227...,
openvpn-devel@lists.sourceforge.net, gert@...1296...
Message-ID: <0e22a53e35f9dc589d199896d2a1f0ae8b564c9a-EmailReplacePatchSet-HTML@...2715...>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
Content-Type: multipart/alternative; boundary="lC3k2Rpq75w="; 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
--lC3k2Rpq75w=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld.
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 (#3).
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.
Also remove the handling to autodetect -llzo. This
seems to be very uncommon now (we do not have examples
of it in our build farm). If you have a system that
needs -llzo just specify LZO_LIBS or configure pkg-config
correctly.
v2:
- simplify code by removing -llzo special handling
Change-Id: I1c038dc4ec80d3499582d81eee61fee74f26e693
Signed-off-by: Frank Lichtenheld
---
M configure.ac
1 file changed, 9 insertions(+), 12 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/56/556/3
diff --git a/configure.ac b/configure.ac
index ce8b2b0..e5c11da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,19 +1143,16 @@
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
- AC_CHECK_LIB(
+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],
- [lzo1x_1_15_compress],
- [LZO_LIBS=3D"-llzo2"],
- [AC_CHECK_LIB(
- [lzo],
- [lzo1x_1_15_compress],
- [LZO_LIBS=3D"-llzo"],
- [have_lzo=3D"no"]
- )]
- )
+ [have_lzo=3D"yes"],
+ [have_lzo=3D"no"]
+ )
+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: 3
Gerrit-Owner: flichtenheld
Gerrit-Reviewer: plaisthos
Gerrit-CC: cron2
Gerrit-CC: openvpn-devel
Gerrit-Attention: flichtenheld
Gerrit-MessageType: newpatchset
--lC3k2Rpq75w=
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Attention is currently required from: flichtenheld.
flichtenheld uploaded patch set #3 to this change.
<=
p>View Ch=
ange
configure: Try to detect LZO with pkg-config
On most system=
s this should work just fine.
Also remove the handling to autodetect=
-llzo. This
seems to be very uncommon now (we do not have examples
o=
f it in our build farm). If you have a system that
needs -llzo just spec=
ify LZO_LIBS or configure pkg-config
correctly.
v2:
- simplif=
y code by removing -llzo special handling
Change-Id: I1c038dc4ec80d3=
499582d81eee61fee74f26e693
Signed-off-by: Frank Lichtenheld <frank@...1186...=
.2641...>
---
M configure.ac
1 file changed, 9 insertions(+), 1=
2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn re=
fs/changes/56/556/3
diff --git a/configure.ac b/configure.ac=
index ce8b2b0..e5c11da 100644
--- a/configure.ac<=
/span>
+++ b/configure.ac
@@ -1143,19 +1143,16 @@<=
/span>
AC_ARG_VAR([LZO_CFLAGS], [C compiler fla=
gs for lzo])
AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]=
)
-have_lzo=3D"yes=
"
-if test -z &quo=
t;${LZO_LIBS}"; then
- AC_CHECK_LIB(
+i=
f test -z "${LZO_CFLAGS}" -a -z "${LZO_LIBS}"; then
+ # if the user did no=
t explicitly specify flags, try to autodetect
+ PKG_CHECK_MODULES([LZO],
[l=
zo2],
- [lzo1x_1_15_co=
mpress],
- [LZO_LIBS=
=3D"-llzo2"],
- [AC_CHECK_LIB(
- =
[lzo],
- [lzo1x_1_15_=
compress],
- [LZO_LIB=
S=3D"-llzo"],
- [have_lzo=3D"no"]
- )]
- )
+ [have_lzo=3D"yes=
"],
+ [have_lzo=
=3D"no"]
+ =
)
+else
=
+ # assume the user configur=
ed it correctly
+ =
have_lzo=3D"yes"
fi
if test &qu=
ot;${have_lzo}" =3D "yes"; then
saved_CFLA=
GS=3D"${CFLAGS}"
To view, vis=
it change=
556. To unsubscribe, or for help writing mail filters, visit settings.
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c038dc4ec80d3499582d81eee6=
1fee74f26e693
Gerrit-Change-Number: 556
Gerrit-PatchSet: 3
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: flichtenheld <frank@...2375...=
41...>
Gerrit-MessageType: newpatchset
--lC3k2Rpq75w=--