aboutsummaryrefslogtreecommitdiff
blob: b1bf436ad9b670e7c86db90f8504ac31bda88958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/configure.ac
+++ b/configure.ac
@@ -304,16 +304,8 @@ if ${PKG_CONFIG} udev --atleast-version 190; then
 fi
 AC_SUBST(UDEVDIR)
 
-dnl lzo library does not provide pkg-config, let use classic way
-AC_CHECK_LIB([lzo2], [lzo_version], [
-	LZO2_LIBS="-llzo2"
-	LZO2_CFLAGS=""
-	LZO2_LIBS_STATIC="-llzo2"],[
-	AC_MSG_ERROR([cannot find lzo2 library])
-])
-AC_SUBST([LZO2_LIBS])
-AC_SUBST([LZO2_LIBS_STATIC])
-AC_SUBST([LZO2_CFLAGS])
+PKG_CHECK_MODULES(LZO2, [lzo2])
+PKG_STATIC(LZO2_LIBS_STATIC, [lzo2])
 
 dnl call PKG_INSTALLDIR from pkg.m4 to set pkgconfigdir
 m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_MSG_ERROR([please install pkgconf])])