Changeset: cbc9d6f7907e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cbc9d6f7907e
Modified Files:
        common/stream/monetdb-stream.pc.in
        configure.ag
Branch: Aug2018
Log Message:

Use pkg-config for liblz4.


diffs (52 lines):

diff --git a/common/stream/monetdb-stream.pc.in 
b/common/stream/monetdb-stream.pc.in
--- a/common/stream/monetdb-stream.pc.in
+++ b/common/stream/monetdb-stream.pc.in
@@ -12,7 +12,7 @@ includedir=@includedir@
 Name: monetdb-stream
 Description: MonetDB streams libary
 Version: @PACKAGE_VERSION@
-Requires: @PKG_CURL@ @PKG_ZLIB@ @PKG_LIBLZMA@
+Requires: @PKG_CURL@ @PKG_ZLIB@ @PKG_LIBLZMA@ @PKG_LZ4@
 
-Libs: -L${libdir} -lstream @SOCKET_LIBS@ @BZ_LIBS@ @snappy_LIBS@ @lz4_LIBS@ 
@LIBICONV@
+Libs: -L${libdir} -lstream @SOCKET_LIBS@ @BZ_LIBS@ @snappy_LIBS@ @LIBICONV@
 Cflags: -I${includedir}/monetdb
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1415,29 +1415,13 @@ AC_ARG_WITH([lz4],
                [lz4 library is installed in DIR])],
        [have_lz4="$withval"])
 
-AS_CASE(["$have_lz4"],
-       [yes|no|auto], [],
-       [
-               lz4_CFLAGS="-I$withval/include"
-               lz4_LIBS="-L$withval/lib -llz4"])
-
 AS_VAR_IF([have_lz4], [no], [], [
-       save_CPPFLAGS="$CPPFLAGS"
-       CPPFLAGS="$CPPFLAGS $lz4_CFLAGS"
-       save_LDFLAGS="$LDFLAGS"
-       LDFLAGS="$LDFLAGS $lz4_LDFLAGS"
-       AC_CHECK_HEADER([lz4.h],
-               [AC_CHECK_LIB([lz4], [LZ4_compress_fast],
-                       [AC_DEFINE([HAVE_LIBLZ4], 1, [Define if you have the 
lz4 library])],
-                       [AS_VAR_IF([have_lz4], [auto], [], [AC_MSG_ERROR([-llz4 
library not found])])
-                        have_lz4=no; why_not_lz4="(lz4 library not found)"])],
-               [AS_VAR_IF([have_lz4], [auto], [], [AC_MSG_ERROR([lz4.h header 
not found])])
-                        have_lz4=no; why_not_lz4="(lz4.h header not found)"])
-       LDFLAGS="$save_LDFLAGS"
-       CPPFLAGS="$save_CPPFLAGS"])
-AS_VAR_IF([have_lz4], [no], [lz4_CFLAGS=""; lz4_LIBS=""])
-AC_SUBST([lz4_CFLAGS])
-AC_SUBST([lz4_LIBS])
+       PKG_CHECK_MODULES([lz4], [liblz4 >= 1.8.0],
+               [have_lz4=yes],
+               [have_lz4=no; why_not_lz4="(liblz4 not found)"])
+       AS_VAR_IF([have_lz4], [yes], [
+               AC_DEFINE([HAVE_LIBLZ4], 1, [Define if you have the lz4 
library])
+               AC_SUBST([PKG_LZ4], [liblz4])])])
 AM_CONDITIONAL([HAVE_LIBLZ4], [test x$have_lz4 != xno])
 
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to