Browse Source

Use autoconf archive for boost and openssl

changes/91/636791/1
Monty Taylor 3 months ago
parent
commit
7c55682e08
2 changed files with 11 additions and 4 deletions
  1. 1
    0
      configure.ac
  2. 10
    4
      m4/require_libcpprest.m4

+ 1
- 0
configure.ac View File

@@ -63,6 +63,7 @@ echo "   * System type:         $host_vendor-$host_os"
63 63
 echo "   * Host CPU:            $host_cpu"
64 64
 echo "   * C++ Flags:           $AM_CXXFLAGS"
65 65
 echo "   * CPP Flags:           $AM_CPPFLAGS"
66
+echo "   * LIBS:                $LIBS"
66 67
 echo "   * Debug enabled:       $enable_debug"
67 68
 echo "   * Coverage enabled:    $enable_code_coverage"
68 69
 echo ""

+ 10
- 4
m4/require_libcpprest.m4 View File

@@ -26,18 +26,24 @@
26 26
 # and distribute a modified version of the Autoconf Macro, you may extend
27 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
 
32 30
 AC_DEFUN([REQUIRE_LIBCPPREST],[
33 31
   # --------------------------------------------------------------------
34 32
   #  Check for libcpprest
35 33
   # --------------------------------------------------------------------
36
-  AC_SEARCH_LIBS([CONF_modules_unload], [crypto])
37 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 41
   AX_CXX_CHECK_LIB(cpprest, [utility::datetime::utc_now()])
40 42
   AC_LANG_POP()
41 43
   AS_IF([test "x${ac_cv_lib_cpprest_utility__datetime__utc_now__}" = "xno"],
42 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
 ])

Loading…
Cancel
Save