Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 1 | AC_INIT([ndn-cpp], [0.5], [], |
| 2 | [ndn-cpp], [https://github.com/named-data/ndn-cpp]) |
| 3 | AC_PREREQ([2.59]) |
| 4 | AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign]) |
| 5 | |
| 6 | AC_CONFIG_HEADERS([config.h]) |
Jeff Thompson | 47053ad | 2013-08-05 10:36:53 -0700 | [diff] [blame] | 7 | AM_MAINTAINER_MODE |
Jeff Thompson | 3b3aabf | 2013-06-21 16:50:20 -0700 | [diff] [blame] | 8 | AM_PROG_AR |
Jeff Thompson | 4f03164 | 2013-08-05 11:03:16 -0700 | [diff] [blame] | 9 | AC_PROG_LIBTOOL |
| 10 | AC_PROG_CXX |
Jeff Thompson | 1a1b4c0 | 2013-06-28 22:28:51 -0700 | [diff] [blame] | 11 | AM_PROG_CC_C_O |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 12 | AC_LANG([C++]) |
Jeff Thompson | 3b3aabf | 2013-06-21 16:50:20 -0700 | [diff] [blame] | 13 | |
Jeff Thompson | 1b8f4c9 | 2013-06-19 16:18:46 -0700 | [diff] [blame] | 14 | AX_CXX_COMPILE_STDCXX_11(, optional) |
Jeff Thompson | 8a055e0 | 2013-08-09 10:44:28 -0700 | [diff] [blame] | 15 | AC_CHECK_LIB([crypto], [EVP_EncryptInit], [], |
| 16 | [AC_MSG_FAILURE([can't find openssl crypto lib])]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 17 | |
| 18 | AC_MSG_CHECKING([for std::shared_ptr]) |
| 19 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 20 | [[#include <memory>]] |
| 21 | [[std::shared_ptr<int> have_shared_ptr;]]) |
| 22 | ], [ |
| 23 | AC_MSG_RESULT([yes]) |
| 24 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 1, [1 if have the `std::shared_ptr' class.]) |
| 25 | ], [ |
| 26 | AC_MSG_RESULT([no]) |
| 27 | AC_DEFINE_UNQUOTED([HAVE_STD_SHARED_PTR], 0, [1 if have the `std::shared_ptr' class.]) |
| 28 | ]) |
Jeff Thompson | 9e9ea9f | 2013-06-22 10:31:18 -0700 | [diff] [blame] | 29 | AC_MSG_CHECKING([for boost::shared_ptr]) |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 30 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 31 | [[#include <boost/shared_ptr.hpp>]] |
| 32 | [[boost::shared_ptr<int> have_shared_ptr;]]) |
| 33 | ], [ |
| 34 | AC_MSG_RESULT([yes]) |
| 35 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 1, [1 if have the `boost::shared_ptr' class.]) |
| 36 | ], [ |
| 37 | AC_MSG_RESULT([no]) |
| 38 | AC_DEFINE_UNQUOTED([HAVE_BOOST_SHARED_PTR], 0, [1 if have the `boost::shared_ptr' class.]) |
| 39 | ]) |
| 40 | |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 41 | AC_MSG_CHECKING([for std::function]) |
| 42 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 43 | [[#include <functional>]] |
| 44 | [[std::function<int> have_function();]]) |
| 45 | ], [ |
| 46 | AC_MSG_RESULT([yes]) |
| 47 | AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 1, [1 if have the `std::function' class.]) |
| 48 | ], [ |
| 49 | AC_MSG_RESULT([no]) |
| 50 | AC_DEFINE_UNQUOTED([HAVE_STD_FUNCTION], 0, [1 if have the `std::function' class.]) |
| 51 | ]) |
| 52 | AC_MSG_CHECKING([for boost::function]) |
| 53 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 54 | [[#include <boost/function.hpp>]] |
| 55 | [[boost::function<int> have_function();]]) |
| 56 | ], [ |
| 57 | AC_MSG_RESULT([yes]) |
| 58 | AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 1, [1 if have the `boost::function' class.]) |
| 59 | ], [ |
| 60 | AC_MSG_RESULT([no]) |
| 61 | AC_DEFINE_UNQUOTED([HAVE_BOOST_FUNCTION], 0, [1 if have the `boost::function' class.]) |
| 62 | ]) |
| 63 | |
Jeff Thompson | d4a1e16 | 2013-07-11 12:41:31 -0700 | [diff] [blame] | 64 | AC_MSG_CHECKING([for memcmp]) |
| 65 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 66 | [[#include <memory.h>]] |
| 67 | [[void test() { unsigned char buffer[1]; memcmp(buffer, buffer, 1); }]]) |
| 68 | ], [ |
| 69 | AC_MSG_RESULT([yes]) |
| 70 | AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 1, [1 if have memcmp in memory.h.]) |
| 71 | ], [ |
| 72 | AC_MSG_RESULT([no]) |
| 73 | AC_DEFINE_UNQUOTED([HAVE_MEMCMP], 0, [1 if have memcmp in memory.h.]) |
| 74 | ]) |
Jeff Thompson | c804d52 | 2013-06-27 16:54:27 -0700 | [diff] [blame] | 75 | AC_MSG_CHECKING([for memcpy]) |
| 76 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 77 | [[#include <memory.h>]] |
| 78 | [[void test() { unsigned char buffer[1]; memcpy(buffer, buffer, 1); }]]) |
| 79 | ], [ |
| 80 | AC_MSG_RESULT([yes]) |
| 81 | AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 1, [1 if have memcpy in memory.h.]) |
| 82 | ], [ |
| 83 | AC_MSG_RESULT([no]) |
| 84 | AC_DEFINE_UNQUOTED([HAVE_MEMCPY], 0, [1 if have memcpy in memory.h.]) |
| 85 | ]) |
| 86 | AC_MSG_CHECKING([for memset]) |
| 87 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
| 88 | [[#include <memory.h>]] |
| 89 | [[void test() { unsigned char buffer[1]; memset(buffer, 0, 1); }]]) |
| 90 | ], [ |
| 91 | AC_MSG_RESULT([yes]) |
| 92 | AC_DEFINE_UNQUOTED([HAVE_MEMSET], 1, [1 if have memset in memory.h.]) |
| 93 | ], [ |
| 94 | AC_MSG_RESULT([no]) |
| 95 | AC_DEFINE_UNQUOTED([HAVE_MEMSET], 0, [1 if have memset in memory.h.]) |
| 96 | ]) |
| 97 | |
Jeff Thompson | ca45e55 | 2013-06-26 17:40:06 -0700 | [diff] [blame] | 98 | DX_HTML_FEATURE(ON) |
| 99 | DX_CHM_FEATURE(OFF) |
| 100 | DX_CHI_FEATURE(OFF) |
| 101 | DX_MAN_FEATURE(OFF) |
| 102 | DX_RTF_FEATURE(OFF) |
| 103 | DX_XML_FEATURE(OFF) |
| 104 | DX_PDF_FEATURE(OFF) |
| 105 | DX_PS_FEATURE(OFF) |
| 106 | DX_INIT_DOXYGEN([$PACKAGE_NAME],[Doxyfile]) |
| 107 | |
Jeff Thompson | ff092f5 | 2013-06-19 13:38:12 -0700 | [diff] [blame] | 108 | AC_CONFIG_FILES([Makefile]) |
| 109 | AC_OUTPUT |