about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2019-07-02T01·12+0200
committerNiklas Hambüchen <mail@nh2.me>2019-07-03T02·32+0200
commit00a450026f71306bef6acc150af4aa5ffe75801c (patch)
tree20c072420d74e01899eb2067a6bce55dfdc625e5 /configure.ac
parent96cd3d607374cb4bab27095a62a6f3a832518c5a (diff)
autoconf: Detect boost, require version, set CXXFLAGS.
This turns previous compiler errors complaining about missing files
into proper ./configure time errors telling the user which version
of boost is required.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 398bac0476cc..426d3b674072 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,6 +145,13 @@ AC_ARG_WITH(store-dir, AC_HELP_STRING([--with-store-dir=PATH],
 AC_SUBST(storedir)
 
 
+# Look for boost, a required dependency.
+# Note that AX_BOOST_BASE only exports *CPP* BOOST_CPPFLAGS, no CXX flags,
+# and CPPFLAGS are not passed to the C++ compiler automatically.
+# Thus we append the returned CPPFLAGS to the CXXFLAGS here.
+AX_BOOST_BASE([1.66], [CXXFLAGS="$BOOST_CPPFLAGS $CXXFLAGS"], [AC_MSG_ERROR([Nix requires boost.])])
+
+
 # Look for OpenSSL, a required dependency.
 PKG_CHECK_MODULES([OPENSSL], [libcrypto], [CXXFLAGS="$OPENSSL_CFLAGS $CXXFLAGS"])