Skip to content

Commit

Permalink
Merge pull request #9848 from dx9/wip-ac-boost
Browse files Browse the repository at this point in the history
configure.ac: add _LIBS variables for boost_system and boost_iostreams

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Aug 10, 2016
2 parents 2bebfa4 + 6341f52 commit 0911db3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -969,13 +969,23 @@ AC_CHECK_HEADER([boost/program_options/option.hpp], [],

# If we have the boost system library installed, then we may want to link
# with it.
saved_LIBS="${LIBS}"
LIBS=""
AC_CHECK_LIB(boost_system-mt, main, [],
[AC_CHECK_LIB(boost_system, main, [],
AC_MSG_NOTICE(["Boost system library not found."]))])
BOOST_SYSTEM_LIBS="${LIBS}"
LIBS="${saved_LIBS}"
AC_SUBST(BOOST_SYSTEM_LIBS)

saved_LIBS="${LIBS}"
LIBS=""
AC_CHECK_LIB(boost_iostreams-mt, main, [],
[AC_CHECK_LIB(boost_iostreams, main, [],
AC_MSG_FAILURE(["Boost iostreams library not found."]))])
BOOST_IOSTREAMS_LIBS="${LIBS}"
LIBS="${saved_LIBS}"
AC_SUBST(BOOST_IOSTREAMS_LIBS)

# Find the right boost_thread library.
BOOST_THREAD_LIBS=""
Expand Down
2 changes: 2 additions & 0 deletions src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ LIBCOMMON_DEPS += \
$(LIBCOMPRESSOR) \
$(LIBMSG) $(LIBAUTH) \
$(LIBCRUSH) $(LIBJSON_SPIRIT) $(LIBLOG) $(LIBARCH) \
$(BOOST_SYSTEM_LIBS) \
$(BOOST_IOSTREAMS_LIBS) \
$(BOOST_RANDOM_LIBS) \
$(RESOLV_LIBS)

Expand Down

0 comments on commit 0911db3

Please sign in to comment.