From: "flichtenheld (Code Review)" Date: Mon, 22 Apr 2024 15:43:51 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: <7bb7024258ddc0adf342620e9bafebd19d0ea135-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="jb+bpwGxlpk="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: configure: Try to detect LZO with pkg-config first List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: openvpn-devel --jb+bpwGxlpk= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/556?usp=3Demail to review the following change. Change subject: configure: Try to detect LZO with pkg-config first ...................................................................... configure: Try to detect LZO with pkg-config first On most systems this should work just fine. Change-Id: I1c038dc4ec80d3499582d81eee61fee74f26e693 Signed-off-by: Frank Lichtenheld --- M configure.ac 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/56/556/1 diff --git a/configure.ac b/configure.ac index ce8b2b0..159d47c 100644 --- a/configure.ac +++ b/configure.ac @@ -1143,8 +1143,18 @@ AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo]) AC_ARG_VAR([LZO_LIBS], [linker flags for lzo]) -have_lzo=3D"yes" +have_lzo=3D"no" 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], + [AC_CHECK_LIB([lzo2], [lzo1x_1_15_compress], [have_lzo=3D"yes"], [LZO= _CFLAGS=3D"" LZO_LIBS=3D""])] + [] + ) + fi + if test "${have_lzo}" =3D "no"; then + have_lzo=3D"yes" AC_CHECK_LIB( [lzo2], [lzo1x_1_15_compress], @@ -1156,6 +1166,7 @@ [have_lzo=3D"no"] )] ) + fi 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: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --jb+bpwGxlpk= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

Vi= ew Change

configure: Try to detect LZO with pkg-config first

On = most systems this should work just fine.

Change-Id: I1c038dc4ec80d34= 99582d81eee61fee74f26e693
Signed-off-by: Frank Lichtenheld <frank@...493...= 2641...>
---
M configure.ac
1 file changed, 12 insertions(+), 1= deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs=
/changes/56/556/1
diff --git a/configure.ac b/configure.acindex ce8b2b0..159d47c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,8 +1143,18 @@

AC_ARG_VAR([LZO_CFLAGS], [C compiler flags = for lzo])
AC_ARG_VAR([LZO_LIBS], [linker flags for lzo])
-have_lzo=3D"yes&qu= ot;
+have_lzo=3D"= ;no"
if test -z "${LZO_LIBS}"; then<= br>+ if test -z "${LZO_= CFLAGS}" -a -z "${LZO_LIBS}"; then
+ # if the user did not explicitly specify fla= gs, try to autodetect
+ PKG_CHECK_MODULES([LZO],
+ [lzo2],
= + [AC_CHECK_LIB([lzo2], [lzo1x_1_15_compress], [have_lzo=3D"yes&qu= ot;], [LZO_CFLAGS=3D"" LZO_LIBS=3D""])]
+ []

+ )
+ fi
+ = if test "${have_lzo}" =3D "no"; then
+ have_lzo=3D"yes" AC_CHECK_LIB(
[lzo2],
[lzo1= x_1_15_compress],
@@ -1156,6 +1166,7 @@
= [have_lzo=3D"no"]
)]
)
+ fi
= fi
if test "${have_lzo}" =3D "yes"; th= en
saved_CFLAGS=3D"${CFLAGS}"
<= /span>

To view, visit change 556. To unsubscribe, or for help writin= g mail filters, visit settin= gs.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I1c038dc4ec80d3499582d81eee6= 1fee74f26e693
Gerrit-Change-Number: 556
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-MessageType: newchange
--jb+bpwGxlpk=--