Skip to content

Commit

Permalink
build: work around broken pkg-config file in lzo2 version 2.10
Browse files Browse the repository at this point in the history
In principle this isn't specific to BSD, though 2.10 is only packaged
for BSDs at the moment.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
  • Loading branch information
wferi committed Jan 3, 2018
1 parent e863155 commit 718c0ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 3 additions & 4 deletions configure.ac
Expand Up @@ -114,7 +114,9 @@ AC_ARG_ENABLE([compress-all],
KNET_OPTION_DEFINES([zlib],[compress],[PKG_CHECK_MODULES([zlib], [zlib])])
KNET_OPTION_DEFINES([lz4],[compress],[PKG_CHECK_MODULES([liblz4], [liblz4])])
KNET_OPTION_DEFINES([lzo2],[compress],[
PKG_CHECK_MODULES([lzo2], [lzo2],,
PKG_CHECK_MODULES([lzo2], [lzo2],
[# work around broken pkg-config file in v2.10
AC_SUBST([lzo2_CFLAGS],[`echo $lzo2_CFLAGS | sed 's,/lzo *, ,'`])],
[AC_CHECK_HEADERS([lzo/lzo1x.h],
[AC_CHECK_LIB([lzo2], [lzo1x_decompress_safe],
[AC_SUBST([lzo2_LIBS], [-llzo2])])],
Expand Down Expand Up @@ -212,9 +214,6 @@ case "$host_os" in
;;
esac

AM_CONDITIONAL([KNET_LINUX], [echo $host_os | grep -q linux])
AM_CONDITIONAL([KNET_BSD], [echo $host_os | grep -q bsd])

# Checks for header files.
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([stdlib.h])
Expand Down
5 changes: 0 additions & 5 deletions libknet/Makefile.am
Expand Up @@ -113,12 +113,7 @@ endif
if BUILD_COMPRESS_LZO2
pkglib_LTLIBRARIES += compress_lzo2.la
compress_lzo2_la_LDFLAGS = -module -avoid-version
if KNET_LINUX
compress_lzo2_la_CFLAGS = $(lzo2_CFLAGS)
endif
if KNET_BSD
compress_lzo2_la_CFLAGS = $(lzo2_CFLAGS) -I/usr/local/include
endif
compress_lzo2_la_LIBADD = $(lzo2_LIBS)
endif

Expand Down

0 comments on commit 718c0ae

Please sign in to comment.