summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2019-02-11 14:52:15 +0000
committerMonty Taylor <mordred@inaugust.com>2019-02-11 14:53:57 +0000
commit7c55682e0853bcd0d8926739185c91ceee261648 (patch)
tree64f7504ee74d27204d5850a0e72481cf5270fd08
parent9b9951dff51d4b93b3f8b26ab53b06327bd504df (diff)
Use autoconf archive for boost and openssl
-rw-r--r--configure.ac1
-rw-r--r--m4/require_libcpprest.m414
2 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 614a856..9d5bfd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,7 @@ echo " * System type: $host_vendor-$host_os"
63echo " * Host CPU: $host_cpu" 63echo " * Host CPU: $host_cpu"
64echo " * C++ Flags: $AM_CXXFLAGS" 64echo " * C++ Flags: $AM_CXXFLAGS"
65echo " * CPP Flags: $AM_CPPFLAGS" 65echo " * CPP Flags: $AM_CPPFLAGS"
66echo " * LIBS: $LIBS"
66echo " * Debug enabled: $enable_debug" 67echo " * Debug enabled: $enable_debug"
67echo " * Coverage enabled: $enable_code_coverage" 68echo " * Coverage enabled: $enable_code_coverage"
68echo "" 69echo ""
diff --git a/m4/require_libcpprest.m4 b/m4/require_libcpprest.m4
index 3b1e038..eeeaa8d 100644
--- a/m4/require_libcpprest.m4
+++ b/m4/require_libcpprest.m4
@@ -26,18 +26,24 @@
26# and distribute a modified version of the Autoconf Macro, you may extend 26# and distribute a modified version of the Autoconf Macro, you may extend
27# this special exception to the GPL to apply to your modified version as well. 27# this special exception to the GPL to apply to your modified version as well.
28 28
29# Provides support for finding libcpprest.
30# LIBCPPREST_CFLAGS will be set, in addition to LIBCPPREST and LTLIBCPPREST
31 29
32AC_DEFUN([REQUIRE_LIBCPPREST],[ 30AC_DEFUN([REQUIRE_LIBCPPREST],[
33 # -------------------------------------------------------------------- 31 # --------------------------------------------------------------------
34 # Check for libcpprest 32 # Check for libcpprest
35 # -------------------------------------------------------------------- 33 # --------------------------------------------------------------------
36 AC_SEARCH_LIBS([CONF_modules_unload], [crypto])
37 AC_LANG_PUSH([C++]) 34 AC_LANG_PUSH([C++])
38 AX_CXX_CHECK_LIB(boost_system, [boost::system::system_category()]) 35 AX_CHECK_OPENSSL([],
36 AC_MSG_ERROR([openssl is required for ${PACKAGE}.]))
37
38 AX_BOOST_BASE(1.62)
39 AX_BOOST_SYSTEM
40
39 AX_CXX_CHECK_LIB(cpprest, [utility::datetime::utc_now()]) 41 AX_CXX_CHECK_LIB(cpprest, [utility::datetime::utc_now()])
40 AC_LANG_POP() 42 AC_LANG_POP()
41 AS_IF([test "x${ac_cv_lib_cpprest_utility__datetime__utc_now__}" = "xno"], 43 AS_IF([test "x${ac_cv_lib_cpprest_utility__datetime__utc_now__}" = "xno"],
42 AC_MSG_ERROR([libcpprest is required for ${PACKAGE}.])) 44 AC_MSG_ERROR([libcpprest is required for ${PACKAGE}.]))
45
46 LIBS="${LIBS} ${OPENSSL_LIBS} ${BOOST_SYSTEM_LIB}"
47 AM_CXXFLAGS="${AM_CXXFLAGS} ${OPENSSL_CFLAGS}"
48 AM_LDFLAGS="${AM_LDFLAGS} ${OPENSSL_LDFLAGS}"
43]) 49])